【问题标题】:Export html from org-mode: custom date format从 org-mode 导出 html:自定义日期格式
【发布时间】:2013-07-16 19:35:30
【问题描述】:

我正在将 org 文件导出为 html。我在 Emacs 24 中使用 Org-mode 7.9.3f。

如何在 postamble 中获得自定义时间格式?

我尝试将变量 org-export-html-postamble-format 设置为

(setq org-export-html-postamble-format 
       '(("en" "<p class=\"date\">Date: %d</p>")))

那么时间格式是这样的:2013-07-16T21:20+0200

我只想要日期:2013-07-16,即 %y-%m-%d。

【问题讨论】:

    标签: html org-mode


    【解决方案1】:

    你应该试试:

    (setq org-export-html-date-format-string "%Y-%m-%d")
    

    【讨论】:

    • 谢谢!我现在使用的是 org-mode 的 8.0.6 版本。变量 org-export-html-date-format-string 不再存在。相反,必须自定义 org-html-metadata-timestamp-format 变量。在后置码格式中也必须使用 %T,而不是 %d。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多