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.
This commit is contained in:
Quentin Boyer 2024-07-25 19:21:46 +02:00 committed by GaetanLepage
parent ac50052a49
commit c12e59ff7c
4 changed files with 5 additions and 5 deletions

View file

@ -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

View file

@ -119,7 +119,7 @@ in
transformOptions
;
# TODO: Find how to handle stable when 24.11 lands
search = mkSearch "/search/";
search = mkSearch "/nixvim/search/";
};
}
)

View file

@ -264,7 +264,7 @@ pkgs.stdenv.mkDerivation {
];
buildPhase = ''
dest=$out/share/doc
dest=$out/share/doc/nixvim
mkdir -p $dest
${prepareMD}
mdbook build

View file

@ -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()