summary refs log tree commit diff stats
path: root/config
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-06-01 10:21:41 -0700
committerGitHub <noreply@github.com>2020-06-01 19:21:41 +0200
commit3cf88c2b4955f330e147c98064969626719790de (patch)
treea491043e79dc618147708b24fc0818ef81ea11e6 /config
parent75e579ff8ec3b5b3659612ea24f8d2b8c0e20230 (diff)
downloadNim-3cf88c2b4955f330e147c98064969626719790de.tar.gz
walkDirRecFilter, update doc CI filter, compiler/index.nim for docs + various other fixes (#14501)
* update doc CI filter to include the files mostly likely to require doc rebuild
* remove code duplication in ./config/nimdoc.cfg; show link to compiler docs, various fixes
* walkDirRecFilter, factor nativeToUnixPath workaround
* glob for getRst2html
* docslocal: 40s to build all docs
* revert code dedup in github actions which did not work alas...
* fixups
Diffstat (limited to 'config')
-rw-r--r--config/nimdoc.cfg55
1 files changed, 13 insertions, 42 deletions
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg
index 836b19ab6..945a3dc6c 100644
--- a/config/nimdoc.cfg
+++ b/config/nimdoc.cfg
@@ -81,42 +81,14 @@ $content
 </ul>
 """
 
-doc.body_toc = """
-<div class="row">
-  <div class="three columns">
-  <div class="theme-switch-wrapper">
-    <label class="theme-switch" for="checkbox">
-      <input type="checkbox" id="checkbox" />
-      <div class="slider round"></div>
-    </label>
-   &nbsp;&nbsp;&nbsp; <em>Dark Mode</em>
-  </div>
-  <div id="global-links">
-    <ul class="simple-boot">
-      <li>
-        <a href="manual.html">Manual</a>
-      </li>
-      <li>
-        <a href="lib.html">Standard library</a>
-      </li>
-      <li>
-        <a href="$theindexhref">Index</a>
-      </li>
-    </ul>
-  </div>
-  <div id="searchInputDiv">
-    Search: <input type="text" id="searchInput"
-      onkeyup="search()" />
-  </div>
-  $tableofcontents
-  </div>
-  <div class="nine columns" id="content">
-  <div id="tocRoot"></div>
-  $deprecationMsg
-  <p class="module-desc">$moduledesc</p>
-  $content
+doc.body_toc_groupsection = """
+  <div class="search-groupby">
+    Group by:
+    <select onchange="groupBy(this.value)">
+      <option value="section">Section</option>
+      <option value="type">Type</option>
+    </select>
   </div>
-</div>
 """
 
 @if boot:
@@ -145,19 +117,16 @@ doc.body_toc_group = """
       <li>
         <a href="$theindexhref">Index</a>
       </li>
+      <li>
+        <a href="compiler/$theindexhref">Compiler docs</a>
+      </li>
     </ul>
   </div>
   <div id="searchInputDiv">
     Search: <input type="text" id="searchInput"
       onkeyup="search()" />
   </div>
-  <div class="search-groupby">
-    Group by:
-    <select onchange="groupBy(this.value)">
-      <option value="section">Section</option>
-      <option value="type">Type</option>
-    </select>
-  </div>
+  $body_toc_groupsection
   $tableofcontents
   </div>
   <div class="nine columns" id="content">
@@ -211,6 +180,8 @@ doc.body_toc_group = """
 """
 @end
 
+doc.body_toc %= "${doc.body_toc_group}" # should only be used for boot
+
 doc.body_no_toc = """
 $moduledesc
 $content