From 2c4981e2a7cb5488edfaa78e492648dbff2b6c39 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 25 Sep 2024 13:37:27 +0200 Subject: [PATCH] Docs: restructure apply diataxis --- docs/.gitignore | 5 +- docs/mkdocs.yml | 28 ++-- docs/site/clanmodules/index.md | 7 + docs/site/concepts/index.md | 3 + docs/site/getting-started/secrets.md | 3 +- docs/site/index.md | 20 ++- docs/site/manual/index.md | 42 +++++- docs/site/reference/nix-api/buildclan.md | 179 ++++++++++++++++++++--- docs/site/reference/nix-api/index.md | 6 - 9 files changed, 241 insertions(+), 52 deletions(-) create mode 100644 docs/site/clanmodules/index.md create mode 100644 docs/site/concepts/index.md delete mode 100644 docs/site/reference/nix-api/index.md diff --git a/docs/.gitignore b/docs/.gitignore index 1658c2ad8..932a47563 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,6 +1,3 @@ -/site/reference/clan-core -/site/reference/clanModules -/site/reference/nix-api/inventory.md -/site/reference/cli +/site/reference /site/static/Roboto-Regular.ttf /site/static/FiraCode-VF.ttf \ No newline at end of file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f706fe312..faf7462ef 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -40,24 +40,27 @@ exclude_docs: | nav: - index.md - - Manual: + - Getting Started: + - getting-started/index.md + - Installer: getting-started/installer.md + - Configure: getting-started/configure.md + - Secrets & Facts: getting-started/secrets.md + - Deploy Machine: getting-started/deploy.md + - Guides: - Overview: manual/index.md - - Tutorials: - - Getting Started: - - getting-started/index.md - - Installer: getting-started/installer.md - - Configure: getting-started/configure.md - - Secrets & Facts: getting-started/secrets.md - - Deploy Machine: getting-started/deploy.md - - Disk Encryption: getting-started/disk-encryption.md - - Mesh VPN: getting-started/mesh-vpn.md - - Backup & Restore: getting-started/backups.md - - Adding Machines: manual/adding-machines.md + - Disk Encryption: getting-started/disk-encryption.md + - Mesh VPN: getting-started/mesh-vpn.md + - Backup & Restore: getting-started/backups.md + - Machines: manual/include-machines.md - Inventory: manual/inventory.md - Secrets: manual/secrets.md - Secure Boot: manual/secure-boot.md - Flake-parts: manual/flake-parts.md + - Authoring ClanModules: + - clanmodules/index.md - Contribute: manual/contribute.md + - Concepts: + - Overview: concepts/index.md - Reference: - Overview: reference/index.md - Clan Modules: @@ -119,7 +122,6 @@ nav: - reference/clan-core/deployment.md - reference/clan-core/networking.md - Nix API: - - reference/nix-api/index.md - buildClan: reference/nix-api/buildclan.md - Inventory: reference/nix-api/inventory.md - Blog: diff --git a/docs/site/clanmodules/index.md b/docs/site/clanmodules/index.md new file mode 100644 index 000000000..844de7d91 --- /dev/null +++ b/docs/site/clanmodules/index.md @@ -0,0 +1,7 @@ +# Authoring a clanModule + +This site will guide you through authoring your first module. Explaining which conventions must be followed, such that others will have an enjoyable experience and the module can be used with minimal effort. + +:fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: +Under construction +:fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: diff --git a/docs/site/concepts/index.md b/docs/site/concepts/index.md new file mode 100644 index 000000000..c6065e3d2 --- /dev/null +++ b/docs/site/concepts/index.md @@ -0,0 +1,3 @@ +# Core Concepts + +TODO diff --git a/docs/site/getting-started/secrets.md b/docs/site/getting-started/secrets.md index 65cfec8e3..350fde04e 100644 --- a/docs/site/getting-started/secrets.md +++ b/docs/site/getting-started/secrets.md @@ -60,5 +60,4 @@ If you followed the quickstart tutorial all necessary secrets are initialized at ## Whats next? - [Deployment](deploy.md): How to remotely deploy your machine -- [Advanced Secrets](../manual/secrets.md) If you want to know more about how to save and share passwords in your clan - +- Full [Secrets](../manual/secrets.md) guide If you want to know more about how to save and share passwords in your clan diff --git a/docs/site/index.md b/docs/site/index.md index d6f08ae57..ed40c8b52 100644 --- a/docs/site/index.md +++ b/docs/site/index.md @@ -1,8 +1,14 @@ +--- +hide: + - navigation + - toc +--- + # Home ## Welcome to **Clan**'s documentation -[Quickstart Guide](./getting-started/index.md){ .md-button } +[Getting Started](./getting-started/index.md){ .md-button } ## What's inside @@ -19,13 +25,21 @@ This documentation is structured into the following sections [:octicons-arrow-right-24: Getting started](./getting-started/index.md) -- :material-sign-direction:{ .lg .middle } __Manual__ +- :simple-abstract:{ .lg .middle } __Concepts__ + + --- + + Important Core Concepts that should be inderstood to get the best experience. + + [:octicons-arrow-right-24: Core Concepts](./concepts/index.md) + +- :material-sign-direction:{ .lg .middle } __Guides__ --- Instructions and explanations for practical Implementations ordered by Topic. - [:octicons-arrow-right-24: Manual](./manual/index.md) + [:octicons-arrow-right-24: Guides](./manual/index.md) - :material-api:{ .lg .middle } __Reference__ diff --git a/docs/site/manual/index.md b/docs/site/manual/index.md index a73594132..865210c2d 100644 --- a/docs/site/manual/index.md +++ b/docs/site/manual/index.md @@ -17,18 +17,50 @@ Instructions and explanations for practical Implementations ordered by Topics. [:octicons-arrow-right-24: Getting started](../getting-started/index.md) +- :fontawesome-solid-user-group:{ .lg .middle } __Authoring Modules__ + + --- + + Create clanModules that can be reused by the community. + + [:octicons-arrow-right-24: Authoring clanModules](../clanmodules/index.md) + ## Guides **How-to Guides for achieving a certain goal or solving a specific issue.** -- [Adding Machines](./adding-machines.md): Learn how Clan automatically includes machines and Nix files. +
-- [Secrets](./secrets.md): Learn how to manage secrets. +- [Machines](./include-machines.md) -- [Inventory](./inventory.md): Clan's declaration format for running **services** on one or multiple **machines**. + --- -- [Flake-parts guide](./flake-parts.md): Use clan with [flake-parts](https://flake.parts/). + Learn how Clan automatically includes machines and Nix files. -- [Contribute](./contribute.md): Discover how to set up a development environment to contribute to Clan! +- [Secrets](./secrets.md) + + --- + + Learn how to manage secrets. + +- [Inventory](./inventory.md) + + --- + + Clan's declaration format for running **services** on one or multiple **machines**. + +- [Flake-parts](./flake-parts.md) + + --- + + Use clan with [https://flake-parts.dev]() + +- [Contribute](./contribute.md) + + --- + + Discover how to set up a development environment to contribute to Clan! + +
\ No newline at end of file diff --git a/docs/site/reference/nix-api/buildclan.md b/docs/site/reference/nix-api/buildclan.md index 089e03f64..89a897c86 100644 --- a/docs/site/reference/nix-api/buildclan.md +++ b/docs/site/reference/nix-api/buildclan.md @@ -1,29 +1,170 @@ -# buildClan +# BuildClan -The core [function](https://git.clan.lol/clan/clan-core/src/branch/main/lib/build-clan/default.nix) that produces a Clan. It returns a set of consistent configurations for all machines with ready-to-use secrets, backups and other services. +This provides an overview of the available arguments of the `buildClan` function. -## Inputs +!!! Note "Flake-parts" + Each attribute is also available via `clan.