diff options
author | isaacs <i@izs.me> | 2014-02-26 03:01:26 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-02-26 03:05:58 +0400 |
commit | 94c466066f616c5e247a731acbac8048a5b61e81 (patch) | |
tree | 8b52d645ca5101cecb86427b0abaa7d0e7b78690 | |
parent | e95b5aa0f3d33514de462ab7fa502d72942d1fce (diff) |
Move toc.js script into a file
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | html/dochead.html | 1 | ||||
-rw-r--r-- | html/static/toc.js (renamed from html/docfoot-script.html) | 4 | ||||
-rwxr-xr-x | scripts/doc-build.sh | 3 |
4 files changed, 3 insertions, 6 deletions
@@ -5,7 +5,6 @@ markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md html_docdeps = html/dochead.html \ html/docfoot.html \ - html/docfoot-script.html \ scripts/doc-build.sh \ package.json diff --git a/html/dochead.html b/html/dochead.html index 01f4d2f05..a17bce9e4 100644 --- a/html/dochead.html +++ b/html/dochead.html @@ -3,6 +3,7 @@ <title>@NAME@</title> <meta http-equiv="content-type" value="text/html;utf-8"> <link rel="stylesheet" type="text/css" href="../../static/style.css"> + <script async=true src="../../static/toc.js"></script> <body> <div id="wrapper"> diff --git a/html/docfoot-script.html b/html/static/toc.js index c0fea672a..2cfebd0aa 100644 --- a/html/docfoot-script.html +++ b/html/static/toc.js @@ -1,4 +1,3 @@ -<script> ;(function () { var wrapper = document.getElementById("wrapper") var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0) @@ -27,5 +26,4 @@ toc.innerHTML = els.map(function (el) { }).join("\n") toc.id = "toc" document.body.appendChild(toc) -})() -</script> +})(); diff --git a/scripts/doc-build.sh b/scripts/doc-build.sh index 4ca97322e..849ffce3f 100755 --- a/scripts/doc-build.sh +++ b/scripts/doc-build.sh @@ -73,8 +73,7 @@ case $dest in else cat fi) \ - > $dest \ - && cat html/docfoot-script.html >> $dest + > $dest exit $? ;; *) |