From 15f4fe4306c287d1741b8f0725c72922dd4eff78 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 00000000..ce5adc89 --- /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 b917afbc..097cae79 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 e11c4f14..756ef779 100644 --- a/layouts/partials/katex.html +++ b/layouts/partials/katex.html @@ -2,15 +2,4 @@ - {{end}} From b3182f5d3fe658fc211f8acaf052d0416206c799 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 ce5adc89..00000000 --- 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