diff options
author | JSDurand <mmemmew@gmail.com> | 2021-09-06 14:17:22 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-09-06 14:17:22 +0800 |
commit | 8884f430b38c39e97f1b782a832c06adaa730338 (patch) | |
tree | afc6648d10b56d75ba1fa290ffb6890e33bc26b2 | |
parent | 9760f535005927708a892cbc03fa7217e77aca2b (diff) |
org: conform to XHTML 1.0 strict in the website
* org-conf.el (durand-org-publish-html-advice): I used the tag "time",
which is not supported by XHTML 1.0 strict. Also the attribute
"datetime" is invalid. So I use the "p" tag with a "subtitle"
attribute to display the date/time information below the title of
each article/post. Now the websites all conform to the XHTML 1.0
strict standard, which is a good thing, I surmise.
-rw-r--r-- | org-conf.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/org-conf.el b/org-conf.el index cf0b9b1..22b7c45 100644 --- a/org-conf.el +++ b/org-conf.el @@ -1042,7 +1042,7 @@ title." ;; if it already has a time info, don't generate again (cond ((save-excursion (forward-char 1) - (looking-at-p "<time datetime="))) + (looking-at-p "<p class=\"subtitle\""))) (t (let* ((date (let (temp) (save-excursion @@ -1063,8 +1063,7 @@ title." (date (insert (format - "\n<time datetime=\"%s\">%s</time>\n" - (format-time-string "%FT%T%z" date-time) + "\n<p class=\"subtitle\">%s</p>\n" (format-time-string "%F" date-time))) (write-region nil nil html-file-name)))))))))) |