diff --git a/docs/manifesto/mkdocs.sh b/docs/manifesto/mkdocs.sh index ecfecff..145e0ee 100644 --- a/docs/manifesto/mkdocs.sh +++ b/docs/manifesto/mkdocs.sh @@ -14,6 +14,9 @@ elif [[ "$OSTYPE" == "msys" ]]; then osoptions="--fail-if-warnings --eol=lf " fi options=$osoptions"--toc --number-sections --toc-depth=5 --from markdown+smart+raw_html+fenced_divs+bracketed_spans --to html5 --wrap=preserve --metadata=lang:en --css=$templates/style.css -Bnavbar -o" +if [[ -z $targetDocroot ]]; then + targetDocroot=$docroot +fi for f in * do [[ -d $item && -x $item/mkdocs.sh ]] && $item/mkdocs.sh @@ -30,7 +33,7 @@ do katex=" --katex="$docroot fi done <$f - pandoc --variable $banner_height --variable docroot:$docroot --template $templates/pandoc.template $katex $options $destdir$base.html $base.md + pandoc --variable $banner_height --variable targetDocroot:$targetDocroot --template $templates/pandoc.template $katex $options $destdir$base.html $base.md echo "$destdir$base.html from $f" #else # echo " $base.html up to date" diff --git a/docs/pandoc_templates/pandoc.template b/docs/pandoc_templates/pandoc.template index bf3ea0f..b93eb5e 100644 --- a/docs/pandoc_templates/pandoc.template +++ b/docs/pandoc_templates/pandoc.template @@ -23,7 +23,7 @@ $endif$ $for(css)$ $endfor$ - + $for(header-includes)$ $endfor$ $header-includes$ @@ -47,8 +47,8 @@ $endif$
- - logo + + logo
diff --git a/docs/rootDocs/README.md b/docs/rootDocs/README.md index 9742763..5133f3f 100644 --- a/docs/rootDocs/README.md +++ b/docs/rootDocs/README.md @@ -1,7 +1,10 @@ --- title: >- README +sidebar: true +notmine: false --- + [pre alpha documentation (mostly a wish list)](docs/index.htm) [copyright © and license](./license.txt) diff --git a/docs/rootDocs/mkdocs.sh b/docs/rootDocs/mkdocs.sh index 11590e0..dc0d901 100644 --- a/docs/rootDocs/mkdocs.sh +++ b/docs/rootDocs/mkdocs.sh @@ -1,8 +1,44 @@ #!/bin/bash set -e -echo `dirname $0` cd `dirname $0` docroot="../" -templates=$docroot"pandoc_templates" +targetDocroot="docs/" destdir="../../" -. $templates"/mkdocs.cfg" +banner_height=banner_height:15ex +templates=$docroot"pandoc_templates" +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + osoptions="" +elif [[ "$OSTYPE" == "darwin"* ]]; then + osoptions="" +elif [[ "$OSTYPE" == "cygwin" ]]; then + osoptions="--fail-if-warnings --eol=lf " +elif [[ "$OSTYPE" == "msys" ]]; then + osoptions="--fail-if-warnings --eol=lf " +fi +options=$osoptions"--toc --number-sections --toc-depth=5 --from markdown+smart+raw_html+fenced_divs+bracketed_spans --to html5 --wrap=preserve --metadata=lang:en --css=$templates/style.css -Bnavbar -o" +if [[ -z $targetDocroot ]]; then + targetDocroot=$docroot +fi +for f in * +do + [[ -d $item && -x $item/mkdocs.sh ]] && $item/mkdocs.sh + if [[ $f =~ (.*)".md"$ ]];then + base=${BASH_REMATCH[1]} + if [[ $f -nt $destdir$base.html ]]; then + katex="" + line="" + for i in 1 2 3 4 5 6 + do + read line + + if [[ $line =~ katex ]];then + katex=" --katex="$docroot + fi + done <$f + pandoc --variable $banner_height --variable targetDocroot:$targetDocroot --template $templates/pandoc.template $katex $options $destdir$base.html $base.md + echo "$destdir$base.html from $f" + #else + # echo " $base.html up to date" + fi + fi +done diff --git a/docs/rootDocs/navbar b/docs/rootDocs/navbar new file mode 100644 index 0000000..a10f78c --- /dev/null +++ b/docs/rootDocs/navbar @@ -0,0 +1,7 @@ +
+ vision + scalability + social networking + revelation +
+ \ No newline at end of file