mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 10:44:16 -04:00
chore: server side rendering of math equations (#589)
This commit is contained in:

committed by
GitHub

parent
c74d44492e
commit
b700825943
@ -54,7 +54,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.138.0
|
||||
HUGO_VERSION: 0.145.0
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -146,7 +146,7 @@ run: |
|
||||
3. [hextra-starter-template][hextra-starter-template]を使用していない場合、以下の設定を手動で行います:
|
||||
- ビルドコマンドを `hugo --gc --minify` に設定します。
|
||||
- 公開ディレクトリを `public` に指定します。
|
||||
- 環境変数 `HUGO_VERSION` を追加し、`0.138.0` に設定するか、`netlify.toml` ファイルに設定します。
|
||||
- 環境変数 `HUGO_VERSION` を追加し、`0.145.0` に設定するか、`netlify.toml` ファイルに設定します。
|
||||
4. デプロイします!
|
||||
|
||||
詳細については、[NetlifyでのHugo](https://docs.netlify.com/integrations/frameworks/hugo/)を確認してください。
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.138.0
|
||||
HUGO_VERSION: 0.145.0
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -146,7 +146,7 @@ For more details, check out:
|
||||
3. If you are not using [hextra-starter-template][hextra-starter-template], configure the following manually:
|
||||
- Configure the Build command to `hugo --gc --minify`
|
||||
- Specify the Publish directory to `public`
|
||||
- Add Environment variable `HUGO_VERSION` and set to `0.138.0`, or alternatively, set it in `netlify.toml` file
|
||||
- Add Environment variable `HUGO_VERSION` and set to `0.145.0`, or alternatively, set it in `netlify.toml` file
|
||||
4. Deploy!
|
||||
|
||||
Check [Hugo on Netlify](https://docs.netlify.com/integrations/frameworks/hugo/) for more details.
|
||||
|
@ -54,7 +54,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: 0.138.0
|
||||
HUGO_VERSION: 0.145.0
|
||||
steps:
|
||||
- name: 检出
|
||||
uses: actions/checkout@v4
|
||||
@ -146,7 +146,7 @@ run: |
|
||||
3. 如果您没有使用 [hextra-starter-template][hextra-starter-template],请手动配置以下内容:
|
||||
- 将构建命令配置为 `hugo --gc --minify`
|
||||
- 指定发布目录为 `public`
|
||||
- 添加环境变量 `HUGO_VERSION` 并设置为 `0.138.0`,或者将其设置在 `netlify.toml` 文件中
|
||||
- 添加环境变量 `HUGO_VERSION` 并设置为 `0.145.0`,或者将其设置在 `netlify.toml` 文件中
|
||||
4. 部署!
|
||||
|
||||
查看 [Netlify 上的 Hugo](https://docs.netlify.com/integrations/frameworks/hugo/) 了解更多详情。
|
||||
|
@ -4,7 +4,7 @@ weight: 4
|
||||
math: true
|
||||
---
|
||||
|
||||
$\KaTeX$ برای رندر کردن عبارتهای ریاضی LaTeX استفاده میشود. میتوان آن را در هر صفحه با تنظیم `math` روی `true` در قسمت بالای صفحه فعال کرد.
|
||||
\(\KaTeX\) برای رندر کردن عبارتهای ریاضی LaTeX استفاده میشود. میتوان آن را در هر صفحه با تنظیم `math` روی `true` در قسمت بالای صفحه فعال کرد.
|
||||
|
||||
<!--more-->
|
||||
|
||||
@ -25,10 +25,10 @@ math: true
|
||||
### درونخطی
|
||||
|
||||
```markdown {filename="page.md"}
|
||||
این $\sigma(z) = \frac{1}{1 + e^{-z}}$ درونخطی است.
|
||||
این \(\sigma(z) = \frac{1}{1 + e^{-z}}\) درونخطی است.
|
||||
```
|
||||
|
||||
این $\sigma(z) = \frac{1}{1 + e^{-z}}$ درونخطی است.
|
||||
این \(\sigma(z) = \frac{1}{1 + e^{-z}}\) درونخطی است.
|
||||
|
||||
### پاراگراف جداگانه
|
||||
|
||||
@ -49,7 +49,7 @@ $$F(\omega) = \int_{-\infty}^{\infty} f(t) e^{-j\omega t} \, dt$$
|
||||
|
||||
عبارتهای شیمی از طریق افزونه [mhchem](https://mhchem.github.io/MathJax-mhchem/) پشتیبانی میشوند.
|
||||
|
||||
درونخطی: $\ce{H2O}$ آب است.
|
||||
درونخطی: \(\ce{H2O}\) آب است.
|
||||
|
||||
پاراگراف جداگانه:
|
||||
|
||||
|
@ -4,7 +4,7 @@ weight: 4
|
||||
math: true
|
||||
---
|
||||
|
||||
$\KaTeX$ は LaTeX の数式をレンダリングするために使用されます。ページのフロントマターで `math` を `true` に設定することで、ページごとに有効にすることができます。
|
||||
\(\KaTeX\) は LaTeX の数式をレンダリングするために使用されます。ページのフロントマターで `math` を `true` に設定することで、ページごとに有効にすることができます。
|
||||
|
||||
<!--more-->
|
||||
|
||||
@ -25,10 +25,10 @@ Markdown コンテンツ内で、インラインおよび別段落の LaTeX 数
|
||||
### インライン
|
||||
|
||||
```markdown {filename="page.md"}
|
||||
これは $\sigma(z) = \frac{1}{1 + e^{-z}}$ インラインです。
|
||||
これは \(\sigma(z) = \frac{1}{1 + e^{-z}}\) インラインです。
|
||||
```
|
||||
|
||||
これは $\sigma(z) = \frac{1}{1 + e^{-z}}$ インラインです。
|
||||
これは \(\sigma(z) = \frac{1}{1 + e^{-z}}\) インラインです。
|
||||
|
||||
### 別段落
|
||||
|
||||
@ -86,7 +86,7 @@ $$
|
||||
|
||||
化学式は [mhchem](https://mhchem.github.io/MathJax-mhchem/) 拡張機能を介してサポートされています。
|
||||
|
||||
インライン: $\ce{H2O}$ は水です。
|
||||
インライン: \(\ce{H2O}\) は水です。
|
||||
|
||||
別段落:
|
||||
|
||||
|
@ -3,20 +3,7 @@ title: "LaTeX"
|
||||
weight: 4
|
||||
math: true
|
||||
---
|
||||
|
||||
$\KaTeX$ is used for rendering LaTeX math expressions. It can be enabled per page by setting `math` to `true` in the page front matter.
|
||||
|
||||
<!--more-->
|
||||
|
||||
```yaml {filename="page.md"}
|
||||
---
|
||||
title: "My Page with LaTeX"
|
||||
math: true
|
||||
---
|
||||
|
||||
```
|
||||
|
||||
When enabled, the scripts, stylesheets and fonts from KaTeX will be included automatically in your site. You can start using LaTeX math expressions in your Markdown content.
|
||||
\(\KaTeX\) is used for rendering LaTeX math expressions. No manual activation is needed, you can start using LaTeX math expressions in your Markdown content right away.
|
||||
|
||||
## Example
|
||||
|
||||
@ -25,10 +12,10 @@ Both inline and separate paragraph LaTeX math expressions are supported in the M
|
||||
### Inline
|
||||
|
||||
```markdown {filename="page.md"}
|
||||
This $\sigma(z) = \frac{1}{1 + e^{-z}}$ is inline.
|
||||
This \(\sigma(z) = \frac{1}{1 + e^{-z}}\) is inline.
|
||||
```
|
||||
|
||||
This $\sigma(z) = \frac{1}{1 + e^{-z}}$ is inline.
|
||||
This \(\sigma(z) = \frac{1}{1 + e^{-z}}\) is inline.
|
||||
|
||||
### Separate Paragraph
|
||||
|
||||
@ -86,7 +73,7 @@ For a list of supported functions, see [KaTeX supported functions](https://katex
|
||||
|
||||
Chemistry expressions are supported via [mhchem](https://mhchem.github.io/MathJax-mhchem/) extension.
|
||||
|
||||
Inline: $\ce{H2O}$ is water.
|
||||
Inline: \(\ce{H2O}\) is water.
|
||||
|
||||
Separate paragraph:
|
||||
|
||||
|
@ -4,7 +4,7 @@ weight: 4
|
||||
math: true
|
||||
---
|
||||
|
||||
$\KaTeX$ 用于渲染 LaTeX 数学表达式。可以通过在页面前置设置中将 `math` 设置为 `true` 来启用它。
|
||||
\(\KaTeX\) 用于渲染 LaTeX 数学表达式。可以通过在页面前置设置中将 `math` 设置为 `true` 来启用它。
|
||||
|
||||
<!--more-->
|
||||
|
||||
@ -25,10 +25,10 @@ Markdown 内容中支持内联和独立段落的 LaTeX 数学表达式。
|
||||
### 内联
|
||||
|
||||
```markdown {filename="page.md"}
|
||||
这个 $\sigma(z) = \frac{1}{1 + e^{-z}}$ 是内联的。
|
||||
这个 \(\sigma(z) = \frac{1}{1 + e^{-z}}\) 是内联的。
|
||||
```
|
||||
|
||||
这个 $\sigma(z) = \frac{1}{1 + e^{-z}}$ 是内联的。
|
||||
这个 \(\sigma(z) = \frac{1}{1 + e^{-z}}\) 是内联的。
|
||||
|
||||
### 独立段落
|
||||
|
||||
@ -86,7 +86,7 @@ $$
|
||||
|
||||
通过 [mhchem](https://mhchem.github.io/MathJax-mhchem/) 扩展支持化学表达式。
|
||||
|
||||
内联:$\ce{H2O}$ 是水。
|
||||
内联:\(\ce{H2O}\) 是水。
|
||||
|
||||
独立段落:
|
||||
|
||||
|
Reference in New Issue
Block a user