标签:eva 引入 type cdn vendor val master lin hive
找到安装位置
全局安装一般在默认位置
C:\Users\administrator\AppData\Roaming\npm\node_modules\i5ting_toc
修改marked.js
i5ting_toc\node_modules\marked\lib\marked.js
将第804行修改如下
if (!lang) { return ‘<pre class="prettyprint linenums:0"><code>‘
修改templete.html
i5ting_toc\vendor\template.html
引入google的高亮插件code-prettify
<script type="text/javascript" src="toc/js/jquery-1.4.4.min.js"></script> <script type="text/javascript" src="toc/js/jquery.ztree.all-3.5.min.js"></script> <script type="text/javascript" src="toc/js/ztree_toc.js"></script> <script type="text/javascript" src="toc_conf.js"></script> <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script> /** 增加这一行 **/ <SCRIPT type="text/javascript" > $(document).ready(function(){ var css_conf = eval(markdown_panel_style); $(‘#readme‘).css(css_conf) var conf = eval(jquery_ztree_toc_opts); $(‘#tree‘).ztree_toc(conf); }); </SCRIPT>
再执行编译html命令
i5ting_toc -f sample.md -o
标签:eva 引入 type cdn vendor val master lin hive
原文地址:https://www.cnblogs.com/dshvv/p/12862631.html