gpt4 book ai didi

html - emacs-org 模式和 html 发布 : how to change structure of generated HTML

转载 作者:行者123 更新时间:2023-12-04 16:50:29 25 4
gpt4 key购买 nike

我是初学者,如果我忽略了一些简单的事情,我很抱歉......

我想为我的 HTML 页面使用 emacs 组织模式。 “默认”设置很好用,但是我想使用一种免费的 Web 模板,例如http://www.freecsstemplates.org/preview/goodlife/

这些模板提供了 CSS 文件,但仅在 org-mode 的 HTML 导出中使用 CSS 似乎还不够。看来要正确使用这些模板,我还需要维护此类模板中所示的 HTML 结构。

如何强制 org-mode 生成我喜欢的 HTML 结构(即框架划分)?

似乎“org-export-generic.el”提供了一些选项。即使我说服通用导出为我提供单个 HTML 页面,它仍然不能完全解决 HTML 导出....

最佳答案

org-mode 手册的这一部分提供了一些关于导出到 html 和使用 css 的指导 http://orgmode.org/manual/CSS-support.html#CSS-support这包括对 org-mode 使用的默认类的描述,因此您可以修改您的 CSS。

如果您想修改组织模式导出以匹配您的 CSS 类和 ID,请使用组织标题中的 :HTML_CONTAINER_CLASS: 属性和用于创建 ID 的 :CUSTOM_ID: 属性。

我使用 org 模式的发布功能将多个 org 文件输出到一个网站,而不是按文件设置。您可以在此处找到相关教程 http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html

我的 org-publish-project-alist 看起来像:

'(org-publish-project-alist (quote (("requirements" :components ("req-static" "req-org"))
("req-static" :base-directory "~/org/requirements" :publishing-directory "~/public_html/requirements/" :base-extension "gif\\|css" :publishing-function org-publish-attachment)
("req-org" :base-directory "~/org/requirements/" :publishing-directory "~/public_html/requirements/" :style "<link rel=\"stylesheet\" type=\"text/css\" href=\"./style.css\" />" :section-numbers nil :headline-levels 3 :table-of-contents 2 :auto-sitemap t :sitemap-filename "index.org" :sitemap-title "Requirements for My Software" :link-home "./index.html"))

关于html - emacs-org 模式和 html 发布 : how to change structure of generated HTML,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14323854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com