From 9a65be07e4aba6ff2fef525235b571dc49273232 Mon Sep 17 00:00:00 2001 From: Brad Treloar Date: Sat, 1 Nov 2025 00:03:26 +1030 Subject: [PATCH 01/10] Update frontmatter for astro --- docs/_index.md | 3 --- docs/chess/_index.md | 6 ++++-- docs/chess/openings/_index.md | 1 + docs/design/_index.md | 1 + docs/electronics/_index.md | 6 ++++-- docs/finances/_index.md | 6 ++++-- docs/home-network/_index.md | 4 ++-- docs/household/_index.md | 6 ++++-- docs/latin/_index.md | 6 ++++-- docs/parenting/_index.md | 6 ++++-- docs/professional/_index.md | 1 + docs/professional/web-technologies/tech-stack/languages.md | 4 ---- docs/professional/web-technologies/tech-stack/plan.md | 4 ---- docs/seasonal-events/_index.md | 6 ++++-- docs/self-care/_index.md | 6 ++++-- 15 files changed, 37 insertions(+), 29 deletions(-) delete mode 100644 docs/_index.md create mode 100644 docs/chess/openings/_index.md create mode 100644 docs/professional/_index.md diff --git a/docs/_index.md b/docs/_index.md deleted file mode 100644 index 7f16eda..0000000 --- a/docs/_index.md +++ /dev/null @@ -1,3 +0,0 @@ -# My notes - -Muh notes. diff --git a/docs/chess/_index.md b/docs/chess/_index.md index 22393f0..8062d37 100644 --- a/docs/chess/_index.md +++ b/docs/chess/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 9000 -+++ +--- + +# Chess diff --git a/docs/chess/openings/_index.md b/docs/chess/openings/_index.md new file mode 100644 index 0000000..eeb8825 --- /dev/null +++ b/docs/chess/openings/_index.md @@ -0,0 +1 @@ +# Chess Openings diff --git a/docs/design/_index.md b/docs/design/_index.md index e69de29..3d14cb7 100644 --- a/docs/design/_index.md +++ b/docs/design/_index.md @@ -0,0 +1 @@ +# Design diff --git a/docs/electronics/_index.md b/docs/electronics/_index.md index 55f73ab..e412b46 100644 --- a/docs/electronics/_index.md +++ b/docs/electronics/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 3100 -+++ +--- + +# Electronics diff --git a/docs/finances/_index.md b/docs/finances/_index.md index a2da1a6..c5d22e2 100644 --- a/docs/finances/_index.md +++ b/docs/finances/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 1100 -+++ +--- + +# Finannces diff --git a/docs/home-network/_index.md b/docs/home-network/_index.md index 3531657..223ab9a 100644 --- a/docs/home-network/_index.md +++ b/docs/home-network/_index.md @@ -1,6 +1,6 @@ -+++ +--- weight = 3000 -+++ +--- # Home network diff --git a/docs/household/_index.md b/docs/household/_index.md index 3d21781..7336705 100644 --- a/docs/household/_index.md +++ b/docs/household/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 1200 -+++ +--- + +# Household diff --git a/docs/latin/_index.md b/docs/latin/_index.md index a4e5528..1ca47f1 100644 --- a/docs/latin/_index.md +++ b/docs/latin/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 8000 -+++ +--- + +# Latin diff --git a/docs/parenting/_index.md b/docs/parenting/_index.md index af22252..9f98d35 100644 --- a/docs/parenting/_index.md +++ b/docs/parenting/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 6000 -+++ +--- + +# Parenting diff --git a/docs/professional/_index.md b/docs/professional/_index.md new file mode 100644 index 0000000..63de258 --- /dev/null +++ b/docs/professional/_index.md @@ -0,0 +1 @@ +# Professional diff --git a/docs/professional/web-technologies/tech-stack/languages.md b/docs/professional/web-technologies/tech-stack/languages.md index 3ad2c75..810c5c3 100644 --- a/docs/professional/web-technologies/tech-stack/languages.md +++ b/docs/professional/web-technologies/tech-stack/languages.md @@ -1,7 +1,3 @@ -+++ -title = 'Programming languages' -+++ - # Programming languages ## PHP diff --git a/docs/professional/web-technologies/tech-stack/plan.md b/docs/professional/web-technologies/tech-stack/plan.md index a299f12..8aadc4e 100644 --- a/docs/professional/web-technologies/tech-stack/plan.md +++ b/docs/professional/web-technologies/tech-stack/plan.md @@ -1,7 +1,3 @@ -+++ -title = 'Plan for this section' -+++ - # Plan for this section List the various problem domains: diff --git a/docs/seasonal-events/_index.md b/docs/seasonal-events/_index.md index 755a5e8..caacf10 100644 --- a/docs/seasonal-events/_index.md +++ b/docs/seasonal-events/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 6100 -+++ +--- + +# Seasonal events diff --git a/docs/self-care/_index.md b/docs/self-care/_index.md index 555eb44..fc0733d 100644 --- a/docs/self-care/_index.md +++ b/docs/self-care/_index.md @@ -1,3 +1,5 @@ -+++ +--- weight = 1000 -+++ +--- + +# Self-care From d17cb3509a07d80fe3c79618258d69b8264984e5 Mon Sep 17 00:00:00 2001 From: Brad Treloar Date: Sat, 1 Nov 2025 21:33:17 +1030 Subject: [PATCH 02/10] Theming --- astro/astro.config.mjs | 19 ++++++---- .../src/components/DocumentBreadcrumbs.astro | 18 +++++++++ astro/src/components/DocumentMenu.astro | 4 +- astro/src/layouts/BaseLayout.astro | 1 + astro/src/layouts/DocumentLayout.astro | 12 ------ astro/src/pages/[...path].astro | 12 ++++-- astro/src/styles/main.css | 18 +++++++++ astro/src/utils/docs.ts | 38 +++++++++++++++---- astro/tsconfig.json | 1 + 9 files changed, 89 insertions(+), 34 deletions(-) create mode 100644 astro/src/components/DocumentBreadcrumbs.astro delete mode 100644 astro/src/layouts/DocumentLayout.astro create mode 100644 astro/src/styles/main.css diff --git a/astro/astro.config.mjs b/astro/astro.config.mjs index 6458450..42e9a9e 100644 --- a/astro/astro.config.mjs +++ b/astro/astro.config.mjs @@ -1,17 +1,20 @@ // @ts-check import { defineConfig } from "astro/config"; -const setLayout = () => { - return function (_, file) { - if (file.data.astro.frontmatter.layout === undefined) { - file.data.astro.frontmatter.layout = "@layouts/BaseLayout.astro"; - } - }; -}; +//const setLayout = () => { +// return function (_, file) { +// if (file.data.astro.frontmatter.layout === undefined) { +// file.data.astro.frontmatter.layout = "@layouts/BaseLayout.astro"; +// } +// }; +//}; // https://astro.build/config export default defineConfig({ markdown: { - remarkPlugins: [setLayout], + //remarkPlugins: [setLayout], + shikiConfig: { + theme: "catppuccin-latte", + }, }, }); diff --git a/astro/src/components/DocumentBreadcrumbs.astro b/astro/src/components/DocumentBreadcrumbs.astro new file mode 100644 index 0000000..a4cb164 --- /dev/null +++ b/astro/src/components/DocumentBreadcrumbs.astro @@ -0,0 +1,18 @@ +--- +import { getDocumentPath, getDocumentTitle, getAncestorDocuments } from "@utils/docs"; + +const { document } = Astro.props; +const ancestorDocuments = await getAncestorDocuments(document); +--- + diff --git a/astro/src/components/DocumentMenu.astro b/astro/src/components/DocumentMenu.astro index 9c65bdb..a8f4985 100644 --- a/astro/src/components/DocumentMenu.astro +++ b/astro/src/components/DocumentMenu.astro @@ -4,14 +4,14 @@ import { getDocumentPath, getDocumentTitle, getChildDocuments } from "@utils/doc const { document } = Astro.props; const childDocuments = await getChildDocuments(document); --- -