diff --git a/astro.config.mjs b/astro.config.mjs index 78078c3..4f9d701 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,27 +1,28 @@ -import { defineConfig } from 'astro/config'; -import starlight from '@astrojs/starlight'; +import { defineConfig } from "astro/config"; +import starlight from "@astrojs/starlight"; // https://astro.build/config export default defineConfig({ - integrations: [ - starlight({ - title: 'My Docs', - social: { - github: 'https://github.com/withastro/starlight', - }, - sidebar: [ - { - label: 'Guides', - items: [ - // Each item here is one entry in the navigation menu. - { label: 'Example Guide', slug: 'guides/example' }, - ], - }, - { - label: 'Reference', - autogenerate: { directory: 'reference' }, - }, - ], - }), - ], + integrations: [ + starlight({ + title: "MZWS", + social: { + github: "https://github.com/withastro/starlight", + }, + sidebar: [ + { + label: "Apps", + autogenerate: { directory: "apps" }, + // items: [ + // // Each item here is one entry in the navigation menu. + // { label: "Example Guide", slug: "guides/example" }, + // ], + }, + { + label: "Infra", + autogenerate: { directory: "infra" }, + }, + ], + }), + ], }); diff --git a/src/assets/houston.webp b/src/assets/houston.webp deleted file mode 100644 index 930c164..0000000 Binary files a/src/assets/houston.webp and /dev/null differ diff --git a/src/content/docs/apps/forgejo.md b/src/content/docs/apps/forgejo.md new file mode 100644 index 0000000..134ca48 --- /dev/null +++ b/src/content/docs/apps/forgejo.md @@ -0,0 +1,7 @@ +--- +title: Forgejo +--- + +[Forgejo] is a self-hosted git forge. + +[forgejo]: https://forgejo.org/ diff --git a/src/content/docs/apps/goatcounter.md b/src/content/docs/apps/goatcounter.md new file mode 100644 index 0000000..bb3fe2d --- /dev/null +++ b/src/content/docs/apps/goatcounter.md @@ -0,0 +1,7 @@ +--- +title: Goatcounter +--- + +[Goatcounter] is a self-hosted analytics. + +[goatcounter]: https://www.goatcounter.com/ diff --git a/src/content/docs/apps/wakapi.md b/src/content/docs/apps/wakapi.md new file mode 100644 index 0000000..8ebac5a --- /dev/null +++ b/src/content/docs/apps/wakapi.md @@ -0,0 +1,26 @@ +--- +title: Wakapi +--- + +[Wakapi] is an open-source server-side alternative to [WakaTime]. +The clients are already mostly open-source. + +The server is configured to forward all heartbeats to my upstream wakatime account. + +This service is **public**. It is served by [veil] at https://wakapi.mzhang.io. + +Registration is **NOT** open. + +[wakapi]: https://wakapi.dev/ +[wakatime]: https://wakatime.com/ +[veil]: /infra/veil + +## Client configuration + +Make sure the Wakatime configuration file (`$HOME/.wakatime.cfg`) contains this: + +``` +[settings] +api_url = https://wakapi.mzhang.io/api +api_key = +``` diff --git a/src/content/docs/guides/example.md b/src/content/docs/guides/example.md deleted file mode 100644 index ebd0f3b..0000000 --- a/src/content/docs/guides/example.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Example Guide -description: A guide in my new Starlight docs site. ---- - -Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. -Writing a good guide requires thinking about what your users are trying to do. - -## Further reading - -- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 664b681..1db2ab1 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -4,11 +4,9 @@ description: Get started building your docs site with Starlight. template: splash hero: tagline: Congrats on setting up a new Starlight project! - image: - file: ../../assets/houston.webp actions: - text: Example Guide - link: /guides/example/ + link: /infra/garage icon: right-arrow - text: Read the Starlight docs link: https://starlight.astro.build diff --git a/src/content/docs/infra/garage.md b/src/content/docs/infra/garage.md new file mode 100644 index 0000000..4df8f79 --- /dev/null +++ b/src/content/docs/infra/garage.md @@ -0,0 +1,25 @@ +--- +title: Garage +--- + +[Garage] is a distributed storage service. +It powers https://mzhang.io, this site, as well as many of the other apps. + +## Cluster Information + +There are several nodes: + +- **Minihost.** This node probably has the best uptime. +- **Zhang.** This node runs in my parents' house. +- **Mac.** This node is offline a lot. +- **Desktop (Windows).** This runs an unsupported Windows build of garage. + +I have the cluster running on `consistency_mode = "degraded"`. +This is because I don't have 2 machines that will stay online consistently yet (this may change when I ask my parents to keep the computer on all the time). +On the default setting of consistent, reads will fail, which causes https://mzhang.io to go down whenever there's less than 2 machines online. + +## Administration + +There is an administration interface at http://minihost:3909 (VPN-private). + +[garage]: https://garagehq.deuxfleurs.fr diff --git a/src/content/docs/infra/veil.md b/src/content/docs/infra/veil.md new file mode 100644 index 0000000..f3b1808 --- /dev/null +++ b/src/content/docs/infra/veil.md @@ -0,0 +1,12 @@ +--- +title: Veil +--- + +> A veil is an article of clothing or hanging cloth that is intended to cover some part of the head or face, or an object of some significance. + +Veil serves as the primary public interface to all of the HTTP servers. +It runs [Caddy] under the hood. + +**TODO:** Check the caddy file into version control... + +[caddy]: https://caddyserver.com/ diff --git a/src/content/docs/reference/example.md b/src/content/docs/reference/example.md deleted file mode 100644 index 0224f09..0000000 --- a/src/content/docs/reference/example.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Example Reference -description: A reference page in my new Starlight docs site. ---- - -Reference pages are ideal for outlining how things work in terse and clear terms. -Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting. - -## Further reading - -- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework