1
0
Fork 0

fix static files link

Before, the links in <head> were pointing to the /nix/store path.
This commit is contained in:
ibizaman 2023-12-04 00:42:44 -08:00 committed by Pierre Penninckx
parent ae98a1d6e5
commit 13b756b09c

View file

@ -76,6 +76,7 @@ in stdenv.mkDerivation {
buildPhase = '' buildPhase = ''
mkdir -p out/media mkdir -p out/media
mkdir -p out/highlightjs mkdir -p out/highlightjs
mkdir -p out/static
cp -t out/highlightjs \ cp -t out/highlightjs \
${documentation-highlighter}/highlight.pack.js \ ${documentation-highlighter}/highlight.pack.js \
@ -83,6 +84,12 @@ in stdenv.mkDerivation {
${documentation-highlighter}/mono-blue.css \ ${documentation-highlighter}/mono-blue.css \
${documentation-highlighter}/loader.js ${documentation-highlighter}/loader.js
cp -t out/static \
${nmdsrc}/static/style.css \
${nmdsrc}/static/highlightjs/tomorrow-night.min.css \
${nmdsrc}/static/highlightjs/highlight.min.js \
${nmdsrc}/static/highlightjs/highlight.load.js
substituteInPlace ./options.md \ substituteInPlace ./options.md \
--replace \ --replace \
'@OPTIONS_JSON@' \ '@OPTIONS_JSON@' \
@ -100,10 +107,10 @@ in stdenv.mkDerivation {
--manpage-urls ${manpage-urls} \ --manpage-urls ${manpage-urls} \
--media-dir media \ --media-dir media \
--revision ${lib.trivial.revisionWithDefault release} \ --revision ${lib.trivial.revisionWithDefault release} \
--stylesheet ${nmdsrc}/static/style.css \ --stylesheet static/style.css \
--stylesheet ${nmdsrc}/static/highlightjs/tomorrow-night.min.css \ --stylesheet static/tomorrow-night.min.css \
--script ${nmdsrc}/static/highlightjs/highlight.min.js \ --script static/highlight.min.js \
--script ${nmdsrc}/static/highlightjs/highlight.load.js \ --script static/highlight.load.js \
--toc-depth 1 \ --toc-depth 1 \
--section-toc-depth 1 \ --section-toc-depth 1 \
manual.md \ manual.md \