From: apersaud@lbl.gov
To: emacs-orgmode@gnu.org
Cc: Arun Persaud <apersaud@lbl.gov>
Subject: [PATCH] lisp/ox-html.el: reorder output of meta data in head
Date: Mon, 8 Jun 2015 21:48:26 -0700 [thread overview]
Message-ID: <1433825306-24624-1-git-send-email-apersaud@lbl.gov> (raw)
From: Arun Persaud <apersaud@lbl.gov>
* lisp/ox-html.el (org-html--build-meta-info ): charset and viewport
meta data should come first in `head'. As mentioned for example in:
- https://code.google.com/p/doctype-mirror/wiki/MetaCharsetAttribute
- http://getbootstrap.com/getting-started/#template
Only reordered output, no other code changes.
TINYCHANGE
---
lisp/ox-html.el | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 75c6993..d50ff5e 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1701,7 +1701,6 @@ INFO is a plist used as a communication channel."
'mime-charset))
"iso-8859-1")))
(concat
- (format "<title>%s</title>\n" title)
(when (plist-get info :time-stamp-file)
(format-time-string
(concat "<!-- "
@@ -1714,6 +1713,20 @@ INFO is a plist used as a communication channel."
"meta" " http-equiv=\"Content-Type\" content=\"text/html;charset=%s\""
info))
charset) "\n"
+ (let ((viewport-options
+ (org-remove-if-not (lambda (cell) (org-string-nw-p (cadr cell)))
+ (plist-get info :html-viewport))))
+ (and viewport-options
+ (concat
+ (org-html-close-tag
+ "meta"
+ (format " name=\"viewport\" content=\"%s\""
+ (mapconcat
+ (lambda (elm) (format "%s=%s" (car elm) (cadr elm)))
+ viewport-options ", "))
+ info)
+ "\n")))
+ (format "<title>%s</title>\n" title)
(org-html-close-tag "meta" " name=\"generator\" content=\"Org-mode\"" info)
"\n"
(and (org-string-nw-p author)
@@ -1736,20 +1749,7 @@ INFO is a plist used as a communication channel."
(format " name=\"keywords\" content=\"%s\""
(funcall protect-string keywords))
info)
- "\n"))
- (let ((viewport-options
- (org-remove-if-not (lambda (cell) (org-string-nw-p (cadr cell)))
- (plist-get info :html-viewport))))
- (and viewport-options
- (concat
- (org-html-close-tag
- "meta"
- (format " name=\"viewport\" content=\"%s\""
- (mapconcat
- (lambda (elm) (format "%s=%s" (car elm) (cadr elm)))
- viewport-options ", "))
- info)
- "\n"))))))
+ "\n")))))
(defun org-html--build-head (info)
"Return information for the <head>..</head> of the HTML output.
--
2.4.2
next reply other threads:[~2015-06-09 5:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-09 4:48 apersaud [this message]
2015-06-09 5:23 ` [PATCH] lisp/ox-html.el: reorder output of meta data in head Arun Persaud
2015-06-09 19:09 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433825306-24624-1-git-send-email-apersaud@lbl.gov \
--to=apersaud@lbl.gov \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).