Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 asciidoc 生成 html 文件,对 html 知之甚少。
我可以将段落折叠成一行并仅在用户单击时展开吗?
如果需要JS,如何优雅地将脚本插入asciidoc?我的意思是,我不想编辑由 asciidoc 生成的 html 文件。
是的,这将是您需要做的 Javascript 事情。您需要使用docinfo 文件。基本上它是一个名为<doc-name>-docinfo.html. 该文件中的任何内容都将放置在<head>生成的 html 的标记中。
<doc-name>-docinfo.html
<head>
您不需要任何 Javascript。
用它。
.some heading [%collapsible] ==== some content ====
此代码将给出以下结果。
详见本。