From cb81cd0ae915ccae316322b6d779adf1c91d3dbc Mon Sep 17 00:00:00 2001 From: Shiva Huang Date: Mon, 25 Mar 2019 23:43:53 +0800 Subject: [PATCH] Enhance KaTeX (#26) * Use `.Param` as switch of KaTeX. This make you to decide to enable KaTeX for whole site or for single post. * Enable rendering KaTeX in code block. * Revert "Enable rendering KaTeX in code block." This reverts commit 43684e61815f7332c95f2f02a10643e4e3fdc77a. * Fix description about KaTeX post param --- README.md | 8 ++++++++ layouts/partials/footer.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 38da9a4..b559747 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,14 @@ hidden = true +++ ``` +### Enable KaTeX for this post +Enable KaTeX for a specific post without enabling the global switch. +``` ++++ +katex = true ++++ +``` + ## Contributing 1. Fork it! diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index ac3795a..475b6f6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -12,7 +12,7 @@ - {{ if .Site.Params.Katex }} + {{ if $.Param "katex" }}