summary refs log tree commit diff
path: root/doc/default.nix
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-03-26 08:24:27 -0400
committerGraham Christensen <graham@grahamc.com>2018-03-26 21:44:24 -0400
commit8dac5ce146c0c3afe963ea8bc955d5b147853345 (patch)
treefde04ea30558c36bd80d810d3024e1696bd6d306 /doc/default.nix
parent378e05c6ddcc213652e51c9bdaa5d54c66959156 (diff)
downloadnixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar.gz
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar.bz2
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar.lz
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar.xz
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.tar.zst
nixpkgs-8dac5ce146c0c3afe963ea8bc955d5b147853345.zip
nixpkgs docs: syntax highlight
Diffstat (limited to 'doc/default.nix')
-rw-r--r--doc/default.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/default.nix b/doc/default.nix
index 6f9804417ad..8abde58bb11 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -11,12 +11,18 @@ pkgs.stdenv.mkDerivation {
 
   src = ./.;
 
+  # Hacking on these variables? Make sure to close and open
+  # nix-shell between each test, maybe even:
+  # $ nix-shell --run "make clean all"
+  # otherwise they won't reapply :)
+  HIGHLIGHTJS = pkgs.documentation-highlighter;
   XSL = "${pkgs.docbook5_xsl}/xml/xsl";
   RNG = "${pkgs.docbook5}/xml/rng/docbook/docbook.rng";
   xsltFlags = lib.concatStringsSep " " [
     "--param section.autolabel 1"
     "--param section.label.includes.component.label 1"
-    "--stringparam html.stylesheet 'style.css overrides.css'"
+    "--stringparam html.stylesheet 'style.css overrides.css highlightjs/mono-blue.css'"
+    "--stringparam html.script './highlightjs/highlight.pack.js ./highlightjs/loader.js'"
     "--param xref.with.number.and.title 1"
     "--param toc.section.depth 3"
     "--stringparam admon.style ''"