Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ after = ["links"]
[output.html]
additional-css = ["theme/diagrams.css"]
git-repository-url = "https://github.com/fungi-protocol/docs"
site-url = "/docs/"
10 changes: 10 additions & 0 deletions nix/site.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
pytest -p no:cacheprovider
touch $out
'';
# lychee loads CA certificates to build its HTTP client even with --offline.
links = pkgs.runCommand "links" { nativeBuildInputs = [ pkgs.lychee pkgs.cacert ]; } ''
# The site is served from /docs/, so a link from the root leaves it.
mkdir root && ln -s ${site} root/docs
# The 404 page needs <base href="/docs/"> for browsers to find its assets.
# Lychee does not check this, so verify it separately.
grep -qF '<base href="/docs/">' root/docs/404.html
lychee --offline --include-fragments --no-progress --root-dir $PWD/root root/docs
Comment thread
bc1cindy marked this conversation as resolved.
touch $out
'';
};

packages = {
Expand Down
Loading