Update docs

This commit is contained in:
Austen Adler 2023-03-17 23:10:12 -04:00
parent 56bab704c3
commit ce578ba8c4
5 changed files with 17 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,9 @@
<a href="/docs/algorithm">Algorithm</a>
<a href="/docs/design">Design</a>
<a href="/docs/wordlist">Wordlist</a>
<h1 class="font-bold text-2xl pb-4">Docs</h1>
<ul class="rounded-lg ">
<a href="/docs/algorithm"
><li class="text-lg inline p-2 underline bg-primary-100">Algorithm</li></a
>
<a href="/docs/design"><li class="text-lg inline p-2 underline bg-primary-100">Design</li></a>
<a href="/docs/wordlist"><li class="text-lg inline p-2 underline bg-primary-100">Wordlist</li></a>
</ul>

View File

@ -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;

View File

@ -2,6 +2,7 @@
export let data;
</script>
<h1 class="font-bold text-2xl pb-4">{data.title}</h1>
<div id="documentation-contents">
{@html data.content}
</div>