diff options
author | nodejh <jianghangscu@gmail.com> | 2021-08-16 09:24:19 +0300 |
---|---|---|
committer | nodejh <jianghangscu@gmail.com> | 2021-08-16 09:24:19 +0300 |
commit | ec7b548d1dcc2277cbe016a9725ed96e8fc8eb41 (patch) | |
tree | 11b50b8c3bcbeffc22e3f02c9dbc1c6da51ffb53 | |
parent | d334f480e2868c72e5ab3133c8ed79ffd796c8e2 (diff) |
doc: update README about math typesetting
-rw-r--r-- | README-zh_CN.md | 22 | ||||
-rw-r--r-- | README.md | 19 | ||||
-rw-r--r-- | exampleSite/config.yaml | 10 |
3 files changed, 37 insertions, 14 deletions
diff --git a/README-zh_CN.md b/README-zh_CN.md index 34ff44a..11c74e0 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -135,17 +135,17 @@ hugo ## 3. 可选配置 -### 3.1 在某些页面禁用评论 +### 3.1 在某页面禁用评论 -要在某个页面禁用评论,你可以在页面 Front Matter 中指定 `enableComments = false`。 +要在某页面禁用评论,你可以在页面的 Front Matter 中将 `enableComments` 设置为 `false`。 例如: -``` -+++ -title = "Some title" -enableComments = false -+++ +```yaml +--- +title: Some title +enableComments: false +--- ``` ### 3.2 自定义 CSS 和 JS @@ -164,6 +164,14 @@ customJS: ``` +### 3.3 数学排版 + +该主题使用了 [KaTeX](https://katex.org/) 来支持数学符号拍版。 + +- 全局支持数学排版:在项目的配置文件中将 `math` 设置为 `true` +- 在某页面支持数学拍版:在某页面 Front Matter 中将 `math` 设置为 `true` + + ## License [MIT](https://github.com/nodejh/hugo-theme-mini/blob/master/LICENSE.md)
\ No newline at end of file @@ -136,15 +136,15 @@ hugo ### 3.1 Disable Comments on a single post -You can set `enableComments = false` in front matter to disable disqus comments on a single post. +You can set `enableComments` to `false` in front matter to disable disqus comments on a single post. For example: -``` -+++ -title = "Some title" -enableComments = false -+++ +```yaml +--- +title: Some title +enableComments: false +--- ``` ### 3.2 Custom CSS and JS @@ -162,6 +162,13 @@ customJS: - https://example.com/custom.js # remote js ``` +### 3.3 Math Typesetting + +Mathematical notation is enabled by [KaTeX](https://katex.org/). + +- To enable KaTex globally set the parameter `math` to t`rue` in project’s configuration +- To enable KaTex on a per page basis include the parameter `math` to `true` in content files + ## License diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 0a7ba90..b3ece8c 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -38,6 +38,12 @@ params: bio: Software Engineer # Site Description, used in HTML meat description: My Blog + + + ########################################### + # Optional + ########################################### + # To enable RSS, you could set `enableRSS: true`, default is `true` enableRSS: true # To enable comments, you may need to set `disqusShortname` @@ -46,8 +52,10 @@ params: enableGoogleAnalytics: true # To hidden powerBy message in the page footer, you could set: `showPowerBy: false`, default is `true` showPowerBy: true + # To enable math typesetting , you could set `math: true` + math: false - # Optional + # text in page home: '' # Default: Home about: '' # Default: About archive: '' # Default: Archive |