From 5f4b6306793efb6a20d6707a8ddf1929c802ddbd Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 19 Feb 2024 12:30:26 -0700 Subject: [PATCH] Begin transition to new docs layout Still need to clean things up and get Quick Assist working again --- Caddyfile | 9 +- src/docs/index.html | 187 ++++++++++++++++++++++++++++++++++--- src/includes/header.html | 8 +- src/resources/css/docs.css | 8 +- src/resources/js/docs.js | 9 +- 5 files changed, 200 insertions(+), 21 deletions(-) diff --git a/Caddyfile b/Caddyfile index 4bb9ed9..51b809c 100644 --- a/Caddyfile +++ b/Caddyfile @@ -20,6 +20,13 @@ redir /docs/json /docs/json/ redir /docs/modules /docs/modules/ rewrite /docs/json/* /docs/json/index.html rewrite /docs/modules/* /docs/modules/index.html -rewrite /docs/* /docs/index.html + +# allow direct access to markdown but otherwise +# rewrite to docs index page to render it +@notDirectDocsMarkdown { + path /docs/* + not path *.md +} +rewrite @notDirectDocsMarkdown /docs/index.html reverse_proxy /api/* localhost:4444 diff --git a/src/docs/index.html b/src/docs/index.html index e0c28ae..58bd6dc 100644 --- a/src/docs/index.html +++ b/src/docs/index.html @@ -8,24 +8,187 @@ {{$title}} — Caddy Documentation - {{import "/old/includes/docs/head.html"}} - {{template "docs-head"}} + {{import "/includes/head.html"}} + {{template "head" .}} + + + + + - {{include "/old/includes/docs/header.html"}} + {{include "/includes/header.html" ""}} + +
+
- {{include "/old/includes/docs/nav.html"}} -
-
-
-
-
{{markdown $markdownFile.Body}}
-
+
+ + +
+ +
+ {{ include "/includes/quick-assist/core.html" }} +
+ + {{markdown $markdownFile.Body}} + +

Documentation

+ +
+ {{ include "/includes/quick-assist/core.html" }} +
+ + + + + + + + {{markdown $markdownFile.Body}} +
+ +
-
- {{include "/old/includes/footer.html"}} diff --git a/src/includes/header.html b/src/includes/header.html index 3078e07..8ef9912 100644 --- a/src/includes/header.html +++ b/src/includes/header.html @@ -55,7 +55,6 @@