From c12e59ff7cba4f70b7428899d1af1d59666df1c6 Mon Sep 17 00:00:00 2001 From: Quentin Boyer Date: Thu, 25 Jul 2024 19:21:46 +0200 Subject: [PATCH] doc: Use correct href for nuscht-search This commit also adds a subdirectory in the docs derivation, to have the same local structure than what is uploaded on github pages. --- .github/workflows/build_documentation.yml | 4 ++-- docs/default.nix | 2 +- docs/mdbook/default.nix | 2 +- flake-modules/dev/server.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index c6948403..7c583bb6 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -44,9 +44,9 @@ jobs: set -ex mkdir -p docs-build nix build github:nix-community/nixvim#docs - cp -r result/share/doc/* docs-build + cp -r result/share/doc/nixvim/* docs-build nix build github:nix-community/nixvim/nixos-24.05#docs - cp -r result/share/doc docs-build/stable + cp -r result/share/doc/nixvim docs-build/stable - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/docs/default.nix b/docs/default.nix index 8c98743c..bf7bb65b 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -119,7 +119,7 @@ in transformOptions ; # TODO: Find how to handle stable when 24.11 lands - search = mkSearch "/search/"; + search = mkSearch "/nixvim/search/"; }; } ) diff --git a/docs/mdbook/default.nix b/docs/mdbook/default.nix index ad13645d..1f8d4742 100644 --- a/docs/mdbook/default.nix +++ b/docs/mdbook/default.nix @@ -264,7 +264,7 @@ pkgs.stdenv.mkDerivation { ]; buildPhase = '' - dest=$out/share/doc + dest=$out/share/doc/nixvim mkdir -p $dest ${prepareMD} mdbook build diff --git a/flake-modules/dev/server.py b/flake-modules/dev/server.py index 5928fafe..5300c916 100644 --- a/flake-modules/dev/server.py +++ b/flake-modules/dev/server.py @@ -12,5 +12,5 @@ class UncachedHTTPHandler(http.server.SimpleHTTPRequestHandler): with http.server.HTTPServer(("", PORT), UncachedHTTPHandler) as httpd: - print(f"Serving documentation at http://localhost:{PORT}") + print(f"Serving documentation at http://localhost:{PORT}/nixvim") httpd.serve_forever()