From b4ff12ca0b1b5179c20a1ea57f182caa703b0826 Mon Sep 17 00:00:00 2001 From: Aiden Bai Date: Wed, 4 May 2022 08:10:59 -0700 Subject: [PATCH 1/2] Fix latex --- .pnpm-debug.log | 14 ++++++++++++++ layouts/partials/head.html | 9 +++++++++ layouts/partials/katex.html | 11 ----------- 3 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 .pnpm-debug.log diff --git a/.pnpm-debug.log b/.pnpm-debug.log new file mode 100644 index 000000000..ce5adc898 --- /dev/null +++ b/.pnpm-debug.log @@ -0,0 +1,14 @@ +{ + "0 debug pnpm:scope": { + "selected": 1 + }, + "1 error pnpm": { + "code": "ERR_PNPM_NO_SCRIPT", + "err": { + "name": "pnpm", + "message": "Missing script: dev", + "code": "ERR_PNPM_NO_SCRIPT", + "stack": "pnpm: Missing script: dev\n at Object.handler (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:170956:15)\n at async /opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175391:21\n at async run (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175365:34)\n at async runPnpm (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175583:5)\n at async /opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175575:7" + } + } +} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b917afbc4..097cae79c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -87,6 +87,15 @@ {{if $.Site.Data.config.enableLinkPreview}} initPopover({{strings.TrimRight "/" .Site.BaseURL }}) {{end}} + {{if $.Site.Data.config.enableLatex}} + renderMathInElement(document.body, { + delimiters: [ + {left: '$$', right: '$$', display: true}, + {left: '$', right: '$', display: false}, + ], + throwOnError : false + }); + {{end}} }; attachSPARouting(draw); diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html index e11c4f14e..756ef779e 100644 --- a/layouts/partials/katex.html +++ b/layouts/partials/katex.html @@ -2,15 +2,4 @@ - {{end}} From 7b3696b877c33f8dc605be1f4f4a688fe0df5b84 Mon Sep 17 00:00:00 2001 From: Aiden Bai Date: Wed, 4 May 2022 08:39:25 -0700 Subject: [PATCH 2/2] Remove pnpm debug log --- .pnpm-debug.log | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .pnpm-debug.log diff --git a/.pnpm-debug.log b/.pnpm-debug.log deleted file mode 100644 index ce5adc898..000000000 --- a/.pnpm-debug.log +++ /dev/null @@ -1,14 +0,0 @@ -{ - "0 debug pnpm:scope": { - "selected": 1 - }, - "1 error pnpm": { - "code": "ERR_PNPM_NO_SCRIPT", - "err": { - "name": "pnpm", - "message": "Missing script: dev", - "code": "ERR_PNPM_NO_SCRIPT", - "stack": "pnpm: Missing script: dev\n at Object.handler (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:170956:15)\n at async /opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175391:21\n at async run (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175365:34)\n at async runPnpm (/opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175583:5)\n at async /opt/homebrew/lib/node_modules/pnpm/dist/pnpm.cjs:175575:7" - } - } -} \ No newline at end of file