2016-05-15 41 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

相關問題