2016-05-15 75 views
3

我使用Hugo静态网站生成器来创建网站。我使用这个代码片断,如在文档提供给创建TOC:Hugo目录前面有额外的点

<div id="toc" class="well col-md-4 col-sm-6"> 
    {{ .TableOfContents }} 
</div> 

这是生成的代码:

<div id="toc" class="well col-md-4 col-sm-6"> 
    <nav id="TableOfContents"> 
    <ul> 
     <li> 
     <ul> 
      <li><a href="#step-1-install-hugo:c57cc0038c788519b441e0331c8bebc7">Step 1. Install Hugo</a></li> 
      <li><a href="#step-2-build-the-docs:c57cc0038c788519b441e0331c8bebc7">Step 2. Build the Docs</a></li> 
      <li><a href="#step-3-change-the-docs-site:c57cc0038c788519b441e0331c8bebc7">Step 3. Change the docs site</a></li> 
      <li><a href="#step-4-have-fun:c57cc0038c788519b441e0331c8bebc7">Step 4. Have fun</a></li> 
     </ul> 
     </li> 
    </ul> 
    </nav> 
</div> 

由于此我得到一个额外的子弹。谁能解决这个问题?或者你可以建议CSS从第一个ul删除子弹。

回答

2

使用下面的CSS:

#toc ul { 
    list-style-type: none; 
} 

#toc ul ul { 
    list-style-type: disc; 
} 
+0

冷静,那工作! – aks