mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 22:57:58 +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
|
.PHONY: docs-serve
|
||||||
docs-serve:
|
docs-serve:
|
||||||
hugo -s docs/website serve
|
hugo -s docs/website serve
|
||||||
@ -8,7 +10,7 @@ docs-build:
|
|||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
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
|
.PHONY: check
|
||||||
check:
|
check:
|
||||||
|
@ -106,6 +106,8 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
{ baseUrl ? "https://foo-dogsquared.github.io/nix-module-wrapper-manager-fds" }:
|
||||||
|
|
||||||
buildHugoSite {
|
buildHugoSite {
|
||||||
pname = "wrapper-manager-docs";
|
pname = "wrapper-manager-docs";
|
||||||
version = "2024-07-13";
|
version = "2024-07-13";
|
||||||
@ -124,6 +126,8 @@ in
|
|||||||
|
|
||||||
vendorHash = "sha256-qsmXolxEcYjY2jwIlPRqir5gE8TeVknPGIGF4g89x54=";
|
vendorHash = "sha256-qsmXolxEcYjY2jwIlPRqir5gE8TeVknPGIGF4g89x54=";
|
||||||
|
|
||||||
|
buildFlags = [ "--baseURL" baseUrl ];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
asciidoctorWrapped
|
asciidoctorWrapped
|
||||||
gems
|
gems
|
||||||
|
@ -279,7 +279,7 @@ let
|
|||||||
buildPhase =
|
buildPhase =
|
||||||
args.buildPhase or ''
|
args.buildPhase or ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
hugo "''${buildFlags[@]}" --destination public
|
hugo ''${buildFlags[@]} --destination public
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user