From ab041113589e0fd6ce5afbe4aa2ae5e87bf5e2e3 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Fri, 2 Feb 2024 09:39:29 -0600 Subject: [PATCH] use KaTeX instead --- exampleSite/content/about.md | 12 ++++++------ exampleSite/layouts/partials/foot_custom.html | 7 ++++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md index 050e4dc..ed326c0 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about.md @@ -51,14 +51,14 @@ Here `{Year}` means the year in which the site is built (usually the current yea # Custom layouts -There are two layout files under `layouts/partials/` that you may want to override: `head_custom.html` and `foot_custom.html`. This is how you inject arbitrary HTML code to the head and foot areas. For example, this site has a file `layouts/partials/foot_custom.html` to support LaTeX math via MathJax and center images automatically: +There are two layout files under `layouts/partials/` that you may want to override: `head_custom.html` and `foot_custom.html`. This is how you inject arbitrary HTML code to the head and foot areas. For example, this site has a file `layouts/partials/foot_custom.html` to support LaTeX math via KaTeX and center images automatically: ```html - - + + + - + ``` You can certainly enable highlight.js for syntax highlighting by yourself through `head_custom.html` and `foot_custom.html` if you want. @@ -89,7 +89,7 @@ Lastly, a few words about my design philosophy for this theme: I have been relyi When I started writing this theme, I asked myself, "_What if I just write from scratch?_" No Bootstrap. No Normalize.css. I don't care about IE (life could be so much easier without IE) or inconsistencies among browsers (for personal websites). As long as the theme looks okay in Chrome, Firefox, and Safari, I'm done. Thanks to the simplicity of Markdown, you cannot really produce very complicated HTML, and I think styling the HTML output from Markdown is much simpler than general HTML documents. For example, I do not need to care much about form elements like textareas or buttons. -After I finished this theme, I started to wonder why I'd need `normalize.css` at all (it sounds like a religious belief). The default appearance of modern browsers actually looks pretty good in my eyes, after I tweak the typeface a little bit. +After I finished this theme, I started to wonder why I'd need `normalize.css` at all. The default appearance of modern browsers actually looks pretty good in my eyes, after I tweak the typeface a little bit. Compared to inconsistencies across browsers, I care much more about these properties of HTML elements: diff --git a/exampleSite/layouts/partials/foot_custom.html b/exampleSite/layouts/partials/foot_custom.html index 4f9aaa2..33f384a 100644 --- a/exampleSite/layouts/partials/foot_custom.html +++ b/exampleSite/layouts/partials/foot_custom.html @@ -1,4 +1,5 @@ - - + + + - +