From ce578ba8c4ae133102ac5429dd4fd1ab25ac5e10 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 17 Mar 2023 23:10:12 -0400 Subject: [PATCH] Update docs --- build.earth | 2 +- justfile | 6 +++--- web-frontend/src/routes/docs/+page.svelte | 12 +++++++++--- web-frontend/src/routes/docs/[slug]/+page.js | 3 +++ web-frontend/src/routes/docs/[slug]/+page.svelte | 1 + 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build.earth b/build.earth index 1ff47a7..72a367a 100644 --- a/build.earth +++ b/build.earth @@ -36,7 +36,7 @@ docs: RUN minify --version RUN minify --sync --recursive --output output/ ./docs/ - SAVE ARTIFACT output/* AS LOCAL build/docs/ + SAVE ARTIFACT output/* AS LOCAL ./web-frontend/src/lib/docs/ # rust-deps: # FROM rust:latest diff --git a/justfile b/justfile index 89779ed..834ecbe 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -build: fmt rust-test rust-build +build: fmt docs-build rust-test rust-build push: podman push gitea.austen-wares.com/public/xpin-server @@ -25,8 +25,8 @@ wordlist-build: # # rsync -ha ./web-frontend/build/ ./build/ output-clean: - rm -vrf ./build/ ./web-frontend/build/ ./web-frontend/src/lib/docs/ - mkdir -p ./build/ ./web-frontend/src/lib/docs/ + rm -vrf ./web-frontend/build/ ./web-frontend/src/lib/docs/ + mkdir -p ./web-frontend/src/lib/docs/ docs-build: output-clean earthly +docs diff --git a/web-frontend/src/routes/docs/+page.svelte b/web-frontend/src/routes/docs/+page.svelte index a7fd585..50b381c 100644 --- a/web-frontend/src/routes/docs/+page.svelte +++ b/web-frontend/src/routes/docs/+page.svelte @@ -1,3 +1,9 @@ -Algorithm -Design -Wordlist +

Docs

+ + diff --git a/web-frontend/src/routes/docs/[slug]/+page.js b/web-frontend/src/routes/docs/[slug]/+page.js index e1c4b5d..8230c61 100644 --- a/web-frontend/src/routes/docs/[slug]/+page.js +++ b/web-frontend/src/routes/docs/[slug]/+page.js @@ -8,16 +8,19 @@ export async function load({ params }) { switch (params.slug) { case 'algorithm': return { + title: params.slug.charAt(0).toUpperCase() + params.slug.substr(1).toLowerCase(), content: algorithmDocs }; break; case 'design': return { + title: params.slug.charAt(0).toUpperCase() + params.slug.substr(1).toLowerCase(), content: designDocs }; break; case 'wordlist': return { + title: params.slug.charAt(0).toUpperCase() + params.slug.substr(1).toLowerCase(), content: wordlistDocs }; break; diff --git a/web-frontend/src/routes/docs/[slug]/+page.svelte b/web-frontend/src/routes/docs/[slug]/+page.svelte index 76bf4ad..319a4ff 100644 --- a/web-frontend/src/routes/docs/[slug]/+page.svelte +++ b/web-frontend/src/routes/docs/[slug]/+page.svelte @@ -2,6 +2,7 @@ export let data; +

{data.title}

{@html data.content}