From 98719cc5a348272add01c6503b0f9bb541a748ee Mon Sep 17 00:00:00 2001 From: daudix Date: Wed, 28 Aug 2024 17:09:16 +0300 Subject: [PATCH] Add KaTeX to the config and demo --- CHANGELOG.md | 4 +++- config.toml | 5 +++++ content/demo/index.md | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f63b7c9..3f9030f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v4.7.0...main) +## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v4.7.1...main) + +- Add optional LaTeX rendering using the KaTeX library. ## [4.7.1](https://codeberg.org/daudix/duckquill/compare/v4.7.0...v4.7.1) - 2024-08-28 diff --git a/config.toml b/config.toml index 733d27c..5f0c86f 100644 --- a/config.toml +++ b/config.toml @@ -105,7 +105,12 @@ show_copy_button = true # Whether to show estimated read time in posts. # Calculated using the simple math: number of words รท words per minute. show_read_time = true +# # words_per_minute = "200" +# +# Whether to enable the KaTeX library for rendering LaTeX. +# Note: This will make your page significantly heavier. +katex = true [extra.nav] # Whether to show the Atom/RSS feed button in the nav diff --git a/content/demo/index.md b/content/demo/index.md index 82e5486..6c61bc3 100644 --- a/content/demo/index.md +++ b/content/demo/index.md @@ -86,6 +86,14 @@ pre table td:nth-of-type(1) { ## Extra +### KaTeX + +Duckquill can render LaTeX using the [KaTeX](https://katex.org) library. It can be enabled using the `extra.katex` config variable. + +$$\relax f(x) = \int_{-\infty}^\infty + \hat{f}(\xi)\,e^{2 \pi i \xi x} + \,d\xi$$ + ### Shortcodes Duckquill provides a few useful [shortcodes](https://www.getzola.org/documentation/content/shortcodes/) that simplify some tasks. They can be used on all pages.