From 13b756b09c82ba030d254f70354b188c9071e18d Mon Sep 17 00:00:00 2001 From: ibizaman Date: Mon, 4 Dec 2023 00:42:44 -0800 Subject: [PATCH] fix static files link Before, the links in were pointing to the /nix/store path. --- docs/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 78e8583..d72d57e 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -76,6 +76,7 @@ in stdenv.mkDerivation { buildPhase = '' mkdir -p out/media mkdir -p out/highlightjs + mkdir -p out/static cp -t out/highlightjs \ ${documentation-highlighter}/highlight.pack.js \ @@ -83,6 +84,12 @@ in stdenv.mkDerivation { ${documentation-highlighter}/mono-blue.css \ ${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 \ --replace \ '@OPTIONS_JSON@' \ @@ -100,10 +107,10 @@ in stdenv.mkDerivation { --manpage-urls ${manpage-urls} \ --media-dir media \ --revision ${lib.trivial.revisionWithDefault release} \ - --stylesheet ${nmdsrc}/static/style.css \ - --stylesheet ${nmdsrc}/static/highlightjs/tomorrow-night.min.css \ - --script ${nmdsrc}/static/highlightjs/highlight.min.js \ - --script ${nmdsrc}/static/highlightjs/highlight.load.js \ + --stylesheet static/style.css \ + --stylesheet static/tomorrow-night.min.css \ + --script static/highlight.min.js \ + --script static/highlight.load.js \ --toc-depth 1 \ --section-toc-depth 1 \ manual.md \