mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
docs: specify site-url
Fixes 404 page's relative links and styling being relative to `/`.
This commit is contained in:
parent
4ea34656c2
commit
a92339d83b
2 changed files with 11 additions and 0 deletions
|
@ -5,6 +5,9 @@ multilingual = false
|
||||||
src = "."
|
src = "."
|
||||||
title = "nixvim docs"
|
title = "nixvim docs"
|
||||||
|
|
||||||
|
[output.html]
|
||||||
|
site-url = "@SITE_URL@"
|
||||||
|
|
||||||
[output.html.fold]
|
[output.html.fold]
|
||||||
enable = true
|
enable = true
|
||||||
level = 0
|
level = 0
|
||||||
|
|
|
@ -321,6 +321,10 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
cp "$file" "$path"
|
cp "$file" "$path"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Patch book.toml
|
||||||
|
substituteInPlace ./book.toml \
|
||||||
|
--replace-fail "@SITE_URL@" "$siteURL"
|
||||||
|
|
||||||
# Patch SUMMARY.md - which defiens mdBook's table of contents
|
# Patch SUMMARY.md - which defiens mdBook's table of contents
|
||||||
substituteInPlace ./SUMMARY.md \
|
substituteInPlace ./SUMMARY.md \
|
||||||
--replace-fail "@PLATFORM_OPTIONS@" "$wrapperOptionsSummary" \
|
--replace-fail "@PLATFORM_OPTIONS@" "$wrapperOptionsSummary" \
|
||||||
|
@ -332,6 +336,10 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||||
cp -r ${search}/* $dest/search
|
cp -r ${search}/* $dest/search
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# The root directory of the site
|
||||||
|
# Can be overridden, e.g. by CI
|
||||||
|
siteURL = "/nixvim/";
|
||||||
|
|
||||||
inherit (mdbook)
|
inherit (mdbook)
|
||||||
nixvimOptionsSummary
|
nixvimOptionsSummary
|
||||||
wrapperOptionsSummary
|
wrapperOptionsSummary
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue