Fix previous commit; add missing files.
This commit is contained in:
parent
243376c2f2
commit
c9adce3aad
|
@ -4,7 +4,7 @@ require "nokogiri"
|
|||
def perform_katex_sub(content)
|
||||
rendered = content.gsub /\\\(((?:[^\\]|\\[^\)])*)\\\)/ do |match|
|
||||
puts " Rendering #{$~[1]}"
|
||||
Open3.popen3("$(npm bin)/katex") do |i, o, e, t|
|
||||
Open3.popen3("katex") do |i, o, e, t|
|
||||
i.write $~[1]
|
||||
i.close
|
||||
o.read.force_encoding(Encoding::UTF_8).strip
|
||||
|
@ -12,7 +12,7 @@ def perform_katex_sub(content)
|
|||
end
|
||||
rendered = rendered.gsub /\$\$((?:[^\$]|$[^\$])*)\$\$/ do |match|
|
||||
puts " Rendering display."
|
||||
Open3.popen3("$(npm bin)/katex -d") do |i, o, e, t|
|
||||
Open3.popen3("katex -d") do |i, o, e, t|
|
||||
i.write $~[1]
|
||||
i.close
|
||||
o.read.force_encoding(Encoding::UTF_8).strip
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{ stdenv, hugo, fetchgit, katex, ruby }:
|
||||
{ stdenv, hugo, fetchgit, pkgs, nodejs, ruby }:
|
||||
|
||||
let
|
||||
url = "https://dev.danilafe.com/Web-Projects/blog-static.git";
|
||||
rev = "7f3883fb3994f8ae1a64446a88b729662c9244dc";
|
||||
sha256 = "065by3rjg7a43dqdl5ib07c0xi86balb5x2l54jqnlh1hz00bd85";
|
||||
requiredPackages = import ./required-packages.nix { inherit pkgs nodejs; };
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "blog-static";
|
||||
|
@ -13,5 +14,5 @@ in
|
|||
};
|
||||
builder = ./builder.sh;
|
||||
converter = ./convert.rb;
|
||||
buildInputs = [ hugo katex (ruby.withPackages (ps: [ ps.nokogiri ])) ];
|
||||
buildInputs = [ hugo requiredPackages.katex (ruby.withPackages (ps: [ ps.nokogiri ])) ];
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user