From 90e5ab46434924672da905899b0b6c6fd932306d Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Mon, 13 Mar 2023 00:17:31 -0400 Subject: [PATCH] Improve docs rendering --- build.earth | 2 +- docs/ALGORITHM.adoc | 7 +------ docs/DESIGN.adoc | 6 +----- docs/WORDLIST.adoc | 7 ++----- docs/common.adoc.template | 6 ++++++ docs/index.adoc | 6 +----- web-frontend/src/routes/+layout.svelte | 3 ++- web-frontend/src/routes/docs/+page.svelte | 1 - 8 files changed, 14 insertions(+), 24 deletions(-) create mode 100644 docs/common.adoc.template delete mode 100644 web-frontend/src/routes/docs/+page.svelte diff --git a/build.earth b/build.earth index 7e87480..097cc6a 100644 --- a/build.earth +++ b/build.earth @@ -17,7 +17,7 @@ docs-build: COPY ./README.adoc docs/index.adoc COPY --dir ./docs . - RUN asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg -a "!webfonts" -- ./docs/*.adoc + RUN asciidoctor -r asciidoctor-mathematical -- ./docs/*.adoc RUN \ find docs -type f -not -iname '*.html' -not -iname '*.png' -not -iname '*.svg' -delete && \ : diff --git a/docs/ALGORITHM.adoc b/docs/ALGORITHM.adoc index 4c8fa84..e9001da 100644 --- a/docs/ALGORITHM.adoc +++ b/docs/ALGORITHM.adoc @@ -1,12 +1,7 @@ // echo ALGORITHM.adoc | entr sh -c "podman run --rm -it --network none -v "${PWD}:/documents/" asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg ALGORITHM.adoc; printf 'Done ($(date -Isecond))\n'" +include::common.adoc.template[] :toc: -:nofooter: -:!webfonts: -:source-highlighter: rouge -:rouge-style: molokai -// :stem: -:sectlinks: = Algorithm diff --git a/docs/DESIGN.adoc b/docs/DESIGN.adoc index 4cebe98..886fe12 100644 --- a/docs/DESIGN.adoc +++ b/docs/DESIGN.adoc @@ -1,12 +1,8 @@ // echo DESIGN.adoc | entr sh -c "podman run --rm -it --network none -v "${PWD}:/documents/" asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg DESIGN.adoc; printf 'Done ($(date -Isecond))\n'" +include::common.adoc.template[] :toc: -:nofooter: -:!webfonts: -:source-highlighter: rouge -:rouge-style: molokai :stem: -:sectlinks: = Design diff --git a/docs/WORDLIST.adoc b/docs/WORDLIST.adoc index 13cedc4..bc36159 100644 --- a/docs/WORDLIST.adoc +++ b/docs/WORDLIST.adoc @@ -1,11 +1,8 @@ // echo WORDLIST.adoc | entr sh -c "podman run --rm -it --network none -v "${PWD}:/documents/" asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg WORDLIST.adoc; printf 'Done ($(date -Isecond))\n'" +include::common.adoc.template[] :toc: -:nofooter: -:!webfonts: -:source-highlighter: rouge -:rouge-style: molokai -:sectlinks: +:stem: = Wordlist diff --git a/docs/common.adoc.template b/docs/common.adoc.template new file mode 100644 index 0000000..880dd6a --- /dev/null +++ b/docs/common.adoc.template @@ -0,0 +1,6 @@ +:nofooter: +:!webfonts: +:source-highlighter: rouge +:rouge-style: molokai +:sectlinks: +:mathematical-format: svg diff --git a/docs/index.adoc b/docs/index.adoc index 6e4e4d9..1ffc552 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -1,10 +1,6 @@ // echo WORDLIST.adoc | entr sh -c "podman run --rm -it --network none -v "${PWD}:/documents/" asciidoctor/docker-asciidoctor asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg WORDLIST.adoc; printf 'Done ($(date -Isecond))\n'" -:nofooter: -:!webfonts: -// :source-highlighter: rouge -// :rouge-style: molokai -// :sectlinks: +include::common.adoc.template[] = Index diff --git a/web-frontend/src/routes/+layout.svelte b/web-frontend/src/routes/+layout.svelte index 66badde..1f200f4 100644 --- a/web-frontend/src/routes/+layout.svelte +++ b/web-frontend/src/routes/+layout.svelte @@ -30,7 +30,8 @@
Home Docs diff --git a/web-frontend/src/routes/docs/+page.svelte b/web-frontend/src/routes/docs/+page.svelte deleted file mode 100644 index 4e1d024..0000000 --- a/web-frontend/src/routes/docs/+page.svelte +++ /dev/null @@ -1 +0,0 @@ -