首页 > 解决方案 > Pandoc突出主题

问题描述

我正在尝试为使用 pandoc 框架创建的网站生成一个突出显示的主题。

我遵循了本指南:指南

我以这种方式创建我的主题:

pandoc --print-highlight-style breezedark > my_style.theme 

然后我将它添加到我的命令中,如下所示:

pandoc ..\articles\$_ 
-f markdown 
-t html --template=..\template\article.html 
--defaults=..\defaults\params_$($_.BaseName).yaml 
--highlight-style my_style.theme <-------------------
--output ..\articles\$($_.BaseName).html 

问题是当我去填写它时,我得到了这个错误,并且代码没有被着色:

Could not read highlighting theme my_style.theme

有什么问题?

编辑:我尝试添加这个:

--highlight-style=breezedark

但我的代码在 html 视图中没有着色.. 我试试这个:

```bash
java -version
```

~~~bash
java -version
~~~

这是html的源代码:

       <div class="sourceCode" id="cb2">
           <pre class="sourceCode bash">
               <code class="sourceCode bash">
                   <span id="cb2-1">
                       <a href="#cb2-1"></a>
                       <span class="ex">java</span> -version</span>
                    </code>
                </pre>
            </div>
       <div class="sourceCode" id="cb3">
           <pre class="sourceCode python">
               <code class="sourceCode python">
                   <span id="cb3-1">
                       <a href="#cb3-1"></a>
                       <span class="bu">print</span>(<span class="st">&quot;Hello, world!&quot;</span>)
                    </span>
                </code>
            </pre>
        </div>

标签: pandoc

解决方案


推荐阅读