Try use KaTeX for builds without NPM

This commit is contained in:
Danila Fedorin 2020-04-07 19:20:38 -07:00
parent 42602b2964
commit f2cd4964af
3 changed files with 4 additions and 7 deletions

View File

@ -1,8 +1,5 @@
source $stdenv/setup source $stdenv/setup
# Install KaTeX for back-end rendering.
HOME="." npm install katex
# Build site with Hugo # Build site with Hugo
cp -r $src/* . cp -r $src/* .
hugo --baseUrl="http://localhost:5000" hugo --baseUrl="http://localhost:5000"

View File

@ -1,4 +1,4 @@
{ stdenv, hugo, fetchgit, nodejs, ruby }: { stdenv, hugo, fetchgit, katex, ruby }:
let let
url = "https://dev.danilafe.com/Web-Projects/blog-static.git"; url = "https://dev.danilafe.com/Web-Projects/blog-static.git";
@ -13,5 +13,5 @@ in
}; };
builder = ./builder.sh; builder = ./builder.sh;
converter = ./convert.rb; converter = ./convert.rb;
buildInputs = [ hugo nodejs (ruby.withPackages (ps: [ ps.nokogiri ])) ]; buildInputs = [ hugo katex (ruby.withPackages (ps: [ ps.nokogiri ])) ];
} }

View File

@ -1,7 +1,7 @@
self: super: self: super:
rec { {
pegasus = super.callPackage ./pegasus/default.nix {}; pegasus = super.callPackage ./pegasus/default.nix {};
blog = self.callPackage ./blog/default.nix { katex }; blog = self.callPackage ./blog/default.nix {};
katex = super.callPackage ./katex/default.nix {}; katex = super.callPackage ./katex/default.nix {};
} }