diff --git a/content/_index.md b/content/_index.md index a197bc1..00baf94 100644 --- a/content/_index.md +++ b/content/_index.md @@ -11,10 +11,17 @@ repo_license = "Open-source MIT License." repo_url = "https://git.clan.lol/clan/" # Menu items + [[extra.menu.main]] -name = "Docs" -section = "docs" -url = "/docs/thevision" +name = "Vision" +section = "vision" +url = "/vision/" +weight = 10 + +[[extra.menu.main]] +name = "Architecture" +section = "architecture" +url = "/architecture/" weight = 10 [[extra.menu.main]] @@ -23,6 +30,18 @@ section = "blog" url = "/blog/" weight = 20 +[[extra.menu.main]] +name = "Documentation" +section = "docs" +url = "/docs/" +weight = 10 + +[[extra.menu.main]] +name = "Contributing" +section = "contributing" +url = "/contributing/" +weight = 10 + [[extra.list]] title = "Easy to use" content = 'cLAN provides a user-friendly interface that allows you to establish your own private network, complete with services.' diff --git a/content/docs/overview/design-overview.drawio b/content/architecture/design-overview.drawio similarity index 100% rename from content/docs/overview/design-overview.drawio rename to content/architecture/design-overview.drawio diff --git a/content/docs/overview/design-overview.drawio.png b/content/architecture/design-overview.drawio.png similarity index 100% rename from content/docs/overview/design-overview.drawio.png rename to content/architecture/design-overview.drawio.png diff --git a/content/docs/overview/flake_controller_new.epgz b/content/architecture/flake_controller_new.epgz similarity index 100% rename from content/docs/overview/flake_controller_new.epgz rename to content/architecture/flake_controller_new.epgz diff --git a/content/docs/overview/flake_controller_new.png b/content/architecture/flake_controller_new.png similarity index 100% rename from content/docs/overview/flake_controller_new.png rename to content/architecture/flake_controller_new.png diff --git a/content/docs/overview/index.md b/content/architecture/index.md similarity index 99% rename from content/docs/overview/index.md rename to content/architecture/index.md index ad61c37..20f79b8 100644 --- a/content/docs/overview/index.md +++ b/content/architecture/index.md @@ -1,5 +1,5 @@ +++ -title = "Technical Overview" +title = "Architecture" description = "Overview of cLAN's architecture, components and security" date = 2021-05-01T18:10:00+00:00 updated = 2021-07-13T18:10:00+00:00 @@ -11,7 +11,6 @@ template = "docs/page.html" [extra] lead = "Overview of cLAN's architecture, components and security" toc = true -top = false +++ diff --git a/content/docs/overview/mesh-vpn.drawio b/content/architecture/mesh-vpn.drawio similarity index 100% rename from content/docs/overview/mesh-vpn.drawio rename to content/architecture/mesh-vpn.drawio diff --git a/content/docs/overview/mesh-vpn.drawio.png b/content/architecture/mesh-vpn.drawio.png similarity index 100% rename from content/docs/overview/mesh-vpn.drawio.png rename to content/architecture/mesh-vpn.drawio.png diff --git a/content/docs/overview/proxmox.png b/content/architecture/proxmox.png similarity index 100% rename from content/docs/overview/proxmox.png rename to content/architecture/proxmox.png diff --git a/content/docs/overview/virtualisation.drawio b/content/architecture/virtualisation.drawio similarity index 100% rename from content/docs/overview/virtualisation.drawio rename to content/architecture/virtualisation.drawio diff --git a/content/docs/overview/virtualisation.drawio.png b/content/architecture/virtualisation.drawio.png similarity index 100% rename from content/docs/overview/virtualisation.drawio.png rename to content/architecture/virtualisation.drawio.png diff --git a/content/docs/overview/vm-controller.drawio b/content/architecture/vm-controller.drawio similarity index 100% rename from content/docs/overview/vm-controller.drawio rename to content/architecture/vm-controller.drawio diff --git a/content/docs/overview/vm-controller.drawio.png b/content/architecture/vm-controller.drawio.png similarity index 100% rename from content/docs/overview/vm-controller.drawio.png rename to content/architecture/vm-controller.drawio.png diff --git a/content/contributing.md b/content/contributing.md new file mode 100644 index 0000000..3c9e18d --- /dev/null +++ b/content/contributing.md @@ -0,0 +1,21 @@ ++++ +title = "Contribute to cLAN" +description = "Hack on the code, improve documentation, or submit a showcase." +date = 2021-05-01T18:10:00+00:00 +updated = 2021-05-01T18:10:00+00:00 +draft = false +weight = 410 +sort_by = "weight" +template = "docs/page.html" + +[extra] +toc = true ++++ + +👉 Explore our repos at [git.clan.lol/clan](https://git.clan.lol/clan) + +👉 [Open issues](https://git.clan.lol/clan/clan-core/issues) + +👉 [Open pull requests](https://git.clan.lol/clan/clan-core/issues) + +👉 Source code for this site: [git.clan.lol/clan/clan-homepage](https://git.clan.lol/clan/clan-homepage/src/branch/main/content/docs) diff --git a/content/docs/contributing/how-to-contribute.md b/content/docs/contributing/how-to-contribute.md deleted file mode 100644 index 9e17eb8..0000000 --- a/content/docs/contributing/how-to-contribute.md +++ /dev/null @@ -1,28 +0,0 @@ -+++ -title = "How to Contribute" -description = "Contribute to cLAN, improve documentation, or submit to showcase." -date = 2021-05-01T18:10:00+00:00 -updated = 2021-05-01T18:10:00+00:00 -draft = false -weight = 410 -sort_by = "weight" -template = "docs/page.html" - -[extra] -lead = "Contribute to cLAN, improve documentation, or submit to showcase." -toc = true -top = false -+++ - -## Contribute to the code - -👉 Explore our repos at [git.clan.lol/clan](https://git.clan.lol/clan) - -👉 [Browse issues](https://git.clan.lol/clan/clan-core/issues) - -👉 [Create a new issue](https://git.clan.lol/clan/clan-core/issues/new) - - -## Improve documentation - -👉 The source code for this site lives in [git.clan.lol/clan/clan-homepage](https://git.clan.lol/clan/clan-homepage/src/branch/main/content/docs) diff --git a/content/docs/thevision/index.md b/content/vision.md similarity index 88% rename from content/docs/thevision/index.md rename to content/vision.md index d8ff12a..80523f6 100644 --- a/content/docs/thevision/index.md +++ b/content/vision.md @@ -1,13 +1,17 @@ +++ -title = "The Vision" -description = "The General Vision of this Project" +title = "Vision" +description = "The Vision for this Project" date = 2021-05-01T19:30:00+00:00 updated = 2021-05-01T19:30:00+00:00 draft = false weight = 30 sort_by = "weight" -paginator.next = "docs/overview/index.md" +paginator.next = "/architecture/" template = "docs/page.html" + +[extra] +lead = "Overview of cLAN's architecture, components and security" +toc = true +++ @@ -39,4 +43,4 @@ The core idea is to ensure service decentralization without a single point of fa Within a cLAN, administrators define the configuration file and have control over who becomes part of the network. -Go to [Technical Overview](@/docs/overview/index.md) to see more indepth details of our work. +Go to [Architecture](architecture/) to see more indepth details of our work. diff --git a/flake-parts/website.nix b/flake-parts/website.nix index 0b3076f..e0f2390 100644 --- a/flake-parts/website.nix +++ b/flake-parts/website.nix @@ -1,75 +1,39 @@ -{ - self, - inputs, - ... +{ self +, inputs +, ... }: { - perSystem = { - lib, - pkgs, - self', - inputs', - ... - }: let - build = baseUrl: pkgs.runCommand "website" { - buildInputs = [ pkgs.zola ]; - } '' - mkdir -p $out - cp -r ${self}/* . - chmod -R u+w . + perSystem = + { lib + , pkgs + , self' + , inputs' + , ... + }: + let + build = baseUrl: pkgs.runCommand "website" + { + buildInputs = [ pkgs.zola ]; + } '' + mkdir -p $out + cp -r ${self}/* . + chmod -R u+w . - substituteInPlace config.toml --replace \ - 'base_url = "https://clan.lol"' \ - 'base_url = "${baseUrl}"' \ + substituteInPlace config.toml --replace \ + 'base_url = "https://clan.lol"' \ + 'base_url = "${baseUrl}"' \ - # generates a zola compatible .md from a clan-core/docs/**/*.md - generatePage() { - local sourceFile="$1" - local targetFile="$2" - - # generate title by reading first non-empty line of $file and stripping all '#' symbols - title=$(sed -n '/./{p;q}' "$sourceFile" | sed 's/#*//g') - echo "generating page from clan-core: $title" - - # generate header with title, template, weight to make zola happy - echo -e "+++\ntitle = \"$title\"\ntemplate = \"docs/page.html\"\nweight = 0\n+++" > "$targetFile" - - # append everything from the file but remove header line starting with '#' and all preceding non-empty lines - tail -n +2 "$sourceFile" >> "$targetFile" - } - - # inject pages from clan-core - for dir in ${inputs.clan-core}/docs/*; do - subdir=$(basename $dir) - targetDir="content/docs/$subdir" - mkdir -p "$targetDir" - for file in ${inputs.clan-core}/docs/$subdir/*.md; do - target="content/docs/$subdir/$(basename $file)" - # only generate page if file doesn't start with _ - if [[ $(basename $file) == _* ]]; then - cat "$file" > "$target" - continue - fi - generatePage "$file" "$target" - done - done - - # inject nixos options docs for clanCore - cp -r ${inputs'.clan-core.packages.docs-zola-pages-core} content/docs/core-options - - # inject nixos options docs for clanModules - cp -r ${inputs'.clan-core.packages.docs-zola-pages-modules} content/docs/modules-options - - zola build - cp -r public/* public/.* $out - ''; - in { - packages.default = self'.packages.website; - packages.website = build "https://clan.lol"; - packages.website-localhost = build "http://localhost:1111"; - packages.serve = pkgs.writeShellScriptBin "serve-local" '' - echo "serving: ${self'.packages.website-localhost}" - ${pkgs.python3}/bin/python -m http.server 1111 \ - -d ${self'.packages.website-localhost} - ''; - }; + zola build + cp -r public/* public/.* $out + ''; + in + { + packages.default = self'.packages.website; + packages.website = build "https://clan.lol"; + packages.website-localhost = build "http://localhost:1111"; + packages.serve = pkgs.writeShellScriptBin "serve-local" '' + echo "serving: ${self'.packages.website-localhost}" + ${pkgs.python3}/bin/python -m http.server 1111 \ + -d ${self'.packages.website-localhost} + ''; + }; } diff --git a/themes/adidoks/templates/docs/page.html b/themes/adidoks/templates/docs/page.html index d215d83..8b8bc7e 100644 --- a/themes/adidoks/templates/docs/page.html +++ b/themes/adidoks/templates/docs/page.html @@ -14,7 +14,6 @@
- {{ macros_sidebar::docs_sidebar(current_section=current_section) }} {{ macros_toc::docs_toc(page=page) }}

{{ page.title }}

@@ -23,7 +22,6 @@ {% if config.extra.edit_page %} {{ macros_edit_page::docs_edit_page(current_path=current_path) }} {% endif %} - {{ macros_navigation::docs_navigation(page=page, current_section=current_section) }}