:toc: left
不是嵌入式 asciidoc 的有效选项。详见[1]。
但是,仍有希望,因为您可以更改样式表。首先,更改模板以将类添加"toc2 toc-left"
到 body 标记。这为左侧的 toc 腾出了空间。
然后将toc2
-styles 从原始 aciidoctor 样式表复制到toc
-style,方法是将其复制 & psting 到标题中:
<style>
@media only screen and (min-width:768px){
#toctitle{font-size:1.375em}
#toc.toc{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto; padding-top: 60px;}
#toc.toc #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc>ul{font-size:.9em;margin-bottom:0}
#toc.toc ul ul{margin-left:0;padding-left:1em}
#toc.toc ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
}
@media only screen and (min-width:1280px){
body.toc2{padding-left:20em;padding-right:0}
#toc.toc{width:20em; padding-top: 60px;}
#toc.toc #toctitle{font-size:1.375em}
#toc.toc>ul{font-size:.95em}
#toc.toc ul ul{padding-left:1.25em}
}
</style>
这应该可以解决您的问题。
[1] https://asciidoctor.org/docs/user-manual/#using-a-toc-with-embeddable-html