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 `/`. Cherry-picked: -a92339d83b
-cdbda982f0
This commit is contained in:
parent
91c0602607
commit
8d29728abf
2 changed files with 9 additions and 0 deletions
|
@ -5,6 +5,9 @@ multilingual = false
|
|||
src = "."
|
||||
title = "nixvim docs"
|
||||
|
||||
[output.html]
|
||||
site-url = "@SITE_URL@"
|
||||
|
||||
[output.html.fold]
|
||||
enable = true
|
||||
level = 0
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
nixosOptionsDoc,
|
||||
transformOptions,
|
||||
hmOptions,
|
||||
# The root directory of the site
|
||||
baseHref ? "/",
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
|
@ -238,6 +240,10 @@ let
|
|||
# Using pkgs.writeShellScript helps to avoid the "bash: argument list too long" error
|
||||
bash -e ${pkgs.writeShellScript "copy_docs" docs.commands}
|
||||
|
||||
# Patch book.toml
|
||||
substituteInPlace ./book.toml \
|
||||
--replace-fail "@SITE_URL@" "${baseHref}"
|
||||
|
||||
# Prepare SUMMARY.md for mdBook
|
||||
# Using pkgs.writeText helps to avoid the same error as above
|
||||
substituteInPlace ./SUMMARY.md \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue