From 5194715c34a02ed0c36789382e1d39f931248df4 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sat, 18 Mar 2023 13:03:20 +0900 Subject: Fix injection --- .builds/shell.nix | 4 +++- .gitignore | 2 -- _libs/onlymathml | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.builds/shell.nix b/.builds/shell.nix index 8a1166d..5b50f03 100644 --- a/.builds/shell.nix +++ b/.builds/shell.nix @@ -7,6 +7,8 @@ mkShell { shellHook = '' npm install highlight.js # https://github.com/NixOS/nixpkgs/issues/152201 katex=${nodePackages.katex}/lib/node_modules/katex/dist - install -m 644 $katex/{katex.min.js,contrib/auto-render.min.js} _libs/katex + install -Dm 644 $katex/katex.min.js _libs/katex/katex.min.js + install -Dm 644 $katex/contrib/auto-render.min.js\ + _libs/katex/contrib/auto-render.min.js ''; } diff --git a/.gitignore b/.gitignore index 62aa73a..40391b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ Manifest.toml __site/ -_css/fonts/ -_css/katex.min.css _libs/fead/out.html _libs/fediring _libs/formbox/mbox diff --git a/_libs/onlymathml b/_libs/onlymathml index 5e49d37..4c0e387 100755 --- a/_libs/onlymathml +++ b/_libs/onlymathml @@ -1,7 +1,8 @@ #!/bin/sh -set -ex -for i in $(find . -name *.html) +set -e +for i in $(find $(realpath $(dirname $0)/../__site) -name *.html) do + echo Removing KaTeX HTML from $i t=$(mktemp) htmlq --remove-nodes .katex-html < $i > $t mv $t $i -- cgit 1.4.1