mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 16:57:59 +00:00
docs: make base URL configurable through Nix
This commit is contained in:
parent
0f3a17a802
commit
b0b7852ba6
4
Makefile
4
Makefile
@ -1,3 +1,5 @@
|
||||
BASEURL := "https://foo-dogsquared.github.io/nix-module-wrapper-manager-fds"
|
||||
|
||||
.PHONY: docs-serve
|
||||
docs-serve:
|
||||
hugo -s docs/website serve
|
||||
@ -8,7 +10,7 @@ docs-build:
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
{ command -v nix >/dev/null && nix build -f docs/ website; } || { nix-build docs/ -A website; }
|
||||
{ command -v nix >/dev/null && nix build -f docs/ --argstr baseUrl $(BASEURL) website; } || { nix-build docs/ -A website --argstr baseUrl $(BASEURL); }
|
||||
|
||||
.PHONY: check
|
||||
check:
|
||||
|
@ -106,6 +106,8 @@ in
|
||||
];
|
||||
};
|
||||
in
|
||||
{ baseUrl ? "https://foo-dogsquared.github.io/nix-module-wrapper-manager-fds" }:
|
||||
|
||||
buildHugoSite {
|
||||
pname = "wrapper-manager-docs";
|
||||
version = "2024-07-13";
|
||||
@ -124,6 +126,8 @@ in
|
||||
|
||||
vendorHash = "sha256-qsmXolxEcYjY2jwIlPRqir5gE8TeVknPGIGF4g89x54=";
|
||||
|
||||
buildFlags = [ "--baseURL" baseUrl ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
asciidoctorWrapped
|
||||
gems
|
||||
|
@ -279,7 +279,7 @@ let
|
||||
buildPhase =
|
||||
args.buildPhase or ''
|
||||
runHook preBuild
|
||||
hugo "''${buildFlags[@]}" --destination public
|
||||
hugo ''${buildFlags[@]} --destination public
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user