mirror of https://github.com/jpanther/congo.git
Compare commits
22 Commits
98be867848
...
99e66a9032
Author | SHA1 | Date |
---|---|---|
Azkellas | 99e66a9032 | |
James Panther | 82b5481914 | |
dependabot[bot] | d19572206a | |
James Panther | 0c5d6d1125 | |
James Panther | 5142e27a62 | |
dependabot[bot] | d23e94b820 | |
dependabot[bot] | adc5f4a80d | |
James Panther | 153e6a60d1 | |
James Panther | 84379f67ff | |
dependabot[bot] | cf6f3bed58 | |
Yoganath | 71af1b71ac | |
James Panther | c01a572d82 | |
James Panther | ecedfebf75 | |
James Panther | b667eac5da | |
James Panther | e057da24d2 | |
James Panther | 6e58f8a67d | |
dependabot[bot] | b495f6045c | |
dependabot[bot] | 9e0213f018 | |
dependabot[bot] | 36de6139fd | |
dependabot[bot] | 8d17419e35 | |
Jaewoong Cheon | f2a1cd5c2d | |
Etienne | 98892944c4 |
|
@ -12,7 +12,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Label
|
- name: Label
|
||||||
uses: actions/labeler@v4
|
uses: actions/labeler@v5
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
configuration-path: .github/labeller.yml
|
configuration-path: .github/labeller.yml
|
||||||
|
|
|
@ -10,7 +10,7 @@ jobs:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v8
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
days-before-stale: 120
|
days-before-stale: 120
|
||||||
days-before-close: 30
|
days-before-close: 30
|
||||||
|
|
|
@ -12,13 +12,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
|
- Automatic support for WebP images ([#693](https://github.com/jpanther/congo/pull/693))
|
||||||
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
|
- Warning when building if links to Markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
|
||||||
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
|
- Ability to share articles to Telegram and Line ([#719](https://github.com/jpanther/congo/pull/719))
|
||||||
- New icon for `line` ([#719](https://github.com/jpanther/congo/pull/719))
|
- New icon for `line`([#719](https://github.com/jpanther/congo/pull/719))
|
||||||
|
- Korean translation ([#731](https://github.com/jpanther/congo/pull/731))
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- ⚠️ Hugo extended version is now required when building sites
|
- ⚠️ Hugo extended version is now required when building sites
|
||||||
- ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704))
|
- ⚠️ Author params block in language configuration has been moved to `params.author` ([#704](https://github.com/jpanther/congo/pull/704))
|
||||||
- Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693))
|
- Refactored image logic into a new `picture.html` partial ([#693](https://github.com/jpanther/congo/pull/693))
|
||||||
|
- Upgrade to ChartJS v4.4.1 ([#736](https://github.com/jpanther/congo/pull/736))
|
||||||
|
- Upgrade to Tailwind v3.3.6 ([#737](https://github.com/jpanther/congo/pull/737))
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
@ -97,6 +100,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Spanish translation of example site samples ([#606](https://github.com/jpanther/congo/pull/606))
|
- Spanish translation of example site samples ([#606](https://github.com/jpanther/congo/pull/606))
|
||||||
- Japanese translation of docs and example site ([#618](https://github.com/jpanther/congo/pull/618))
|
- Japanese translation of docs and example site ([#618](https://github.com/jpanther/congo/pull/618))
|
||||||
- German translation of example site ([#631](https://github.com/jpanther/congo/pull/631))
|
- German translation of example site ([#631](https://github.com/jpanther/congo/pull/631))
|
||||||
|
- Properly render KaTeX formulas by adding `block` or `inline` parameter to `katex` shortcode [#634](https://github.com/jpanther/congo/pull/634)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */
|
/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */
|
||||||
|
|
||||||
/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com */
|
/*! tailwindcss v3.3.6 | MIT License | https://tailwindcss.com */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||||
|
@ -121,8 +121,10 @@ strong {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
1. Use the user's configured `mono` font family by default.
|
1. Use the user's configured `mono` font-family by default.
|
||||||
2. Correct the odd `em` font sizing in all browsers.
|
2. Use the user's configured `mono` font-feature-settings by default.
|
||||||
|
3. Use the user's configured `mono` font-variation-settings by default.
|
||||||
|
4. Correct the odd `em` font sizing in all browsers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
code,
|
code,
|
||||||
|
@ -131,8 +133,12 @@ samp,
|
||||||
pre {
|
pre {
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
/* 1 */
|
/* 1 */
|
||||||
font-size: 1em;
|
font-feature-settings: normal;
|
||||||
/* 2 */
|
/* 2 */
|
||||||
|
font-variation-settings: normal;
|
||||||
|
/* 3 */
|
||||||
|
font-size: 1em;
|
||||||
|
/* 4 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -66,6 +66,7 @@ The theme currently supports the following languages out of the box:
|
||||||
| :indonesia: Indonesian | `id` |
|
| :indonesia: Indonesian | `id` |
|
||||||
| :it: Italian | `it` |
|
| :it: Italian | `it` |
|
||||||
| :jp: Japanese | `ja` |
|
| :jp: Japanese | `ja` |
|
||||||
|
| :kr: Korean | `ko` |
|
||||||
| :poland: Polish | `pl` |
|
| :poland: Polish | `pl` |
|
||||||
| :brazil: Portuguese (Brazil) | `pt-br` |
|
| :brazil: Portuguese (Brazil) | `pt-br` |
|
||||||
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
| :portugal: Portuguese (Portugal) | `pt-pt` |
|
||||||
|
|
|
@ -175,21 +175,28 @@ Congoは、標準的なMarkdown構文を使用した場合の画像について
|
||||||
|
|
||||||
## Katex
|
## Katex
|
||||||
|
|
||||||
`katex` を使うと、KaTeXパッケージを使って記事の内容に数式を追加することができます。利用可能な構文については[supported TeX functions](https://katex.org/docs/supported.html)のオンラインリファレンスを参照してください。
|
数式は `katex` ショートコードを使用し、パラメータに `block` (ブロック式の場合) または `inline` を指定してレンダリングすることができます。詳細は[数学的表記]({{< ref "mathematical-notation" >}})を参照してください。
|
||||||
|
|
||||||
記事中に数式を含めるには、コンテンツ内の任意の場所にショートコードを配置するだけです。記事ごとに一度記述するだけで、KaTeXが自動的にそのページのマークアップをレンダリングします。インライン表記とブロック表記の両方がサポートされています。
|
利用可能な構文については[サポートされているTeX関数](https://katex.org/docs/supported.html)のオンラインリファレンスを参照してください。
|
||||||
|
|
||||||
インライン記法は、式を区切り記号 `\\(` と `\\)` で囲むことで生成できます。ブロック記法の場合は `$$` です。
|
|
||||||
|
|
||||||
**例:**
|
**例:**
|
||||||
|
|
||||||
|
```
|
||||||
|
インライン記法: {{</* katex inline */>}}f(a,b,c) = (a^2+b^2+c^2)^3{{</* /katex */>}}
|
||||||
|
```
|
||||||
|
インライン記法: {{< katex inline >}}f(a,b,c) = (a^2+b^2+c^2)^3{{< /katex >}}
|
||||||
|
|
||||||
|
ブロック表記
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* katex */>}}
|
{{</* katex block */>}}
|
||||||
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
|
f(a,b,c) = (a^2+b^2+c^2)^3
|
||||||
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< katex >}}
|
{{< katex block>}}
|
||||||
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
|
f(a,b,c) = (a^2+b^2+c^2)^3
|
||||||
|
{{< /katex>}}
|
||||||
|
|
||||||
[数学的表記のサンプル]({{< ref "mathematical-notation" >}})でより多くの例をチェックしてください。
|
[数学的表記のサンプル]({{< ref "mathematical-notation" >}})でより多くの例をチェックしてください。
|
||||||
|
|
||||||
|
|
|
@ -175,21 +175,28 @@ Icons can also be used in partials by calling the [icon partial]({{< ref "partia
|
||||||
|
|
||||||
## Katex
|
## Katex
|
||||||
|
|
||||||
The `katex` shortcode can be used to add mathematical expressions to article content using the KaTeX package. Refer to the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
|
Mathematical expressions can be rendered using either the `katex` shortcode, with either `block` (for block expression) or `inline` as parameter. See [mathematical notation]({{< ref "mathematical-notation" >}}) for more details.
|
||||||
|
It uses the KaTeX library to render mathematical notation within articles.
|
||||||
|
|
||||||
To include mathematical expressions in an article, simply place the shortcode anywhere with the content. It only needs to be included once per article and KaTeX will automatically render any markup on that page. Both inline and block notation are supported.
|
Refer to the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
|
||||||
|
|
||||||
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters. Alternatively, block notation can be generated using `$$` delimiters.
|
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```md
|
```
|
||||||
{{</* katex */>}}
|
Inline notation: {{</* katex inline */>}}f(a,b,c) = (a^2+b^2+c^2)^3{{</* /katex */>}}
|
||||||
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
|
```
|
||||||
|
Inline notation: {{< katex inline >}}f(a,b,c) = (a^2+b^2+c^2)^3{{< /katex >}}
|
||||||
|
|
||||||
|
Block notation:
|
||||||
|
```
|
||||||
|
{{</* katex block */>}}
|
||||||
|
f(a,b,c) = (a^2+b^2+c^2)^3
|
||||||
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< katex >}}
|
{{< katex block >}}
|
||||||
\\(f(a,b,c) = (a^2+b^2+c^2)^3\\)
|
f(a,b,c) = (a^2+b^2+c^2)^3
|
||||||
|
{{< /katex >}}
|
||||||
|
|
||||||
Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples.
|
Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}}) page for more examples.
|
||||||
|
|
||||||
|
|
|
@ -9,38 +9,39 @@ KaTeX kann verwendet werden, um mathematische Notationen in Artikeln darzustelle
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
{{< katex >}}
|
Congo bindet die KaTeX-Assets nur dann in das Projekt ein, wenn die mathematische Notation verwendet wird. Damit dies funktioniert, kann einfach der Shortcode [`katex`]({{< ref path="docs/shortcodes#katex" lang="en" >}}) der entweder mit `katex block` oder `katex inline` verwendet werden kann in den Artikel eingefügt werden. Jede KaTeX-Syntax auf dieser Seite wird dann automatisch gerendert.
|
||||||
|
|
||||||
Congo bindet die KaTeX-Assets nur dann in das Projekt ein, wenn die mathematische Notation verwendet wird. Damit dies funktioniert, kann einfach der Shortcode [`katex`]({{< ref path="docs/shortcodes#katex" lang="en" >}}) in den Artikel eingefügt werden. Jede KaTeX-Syntax auf dieser Seite wird dann automatisch gerendert.
|
|
||||||
|
|
||||||
Die Online-Referenz der [unterstützten TeX-Funktionen](https://katex.org/docs/supported.html) zeigt Syntax-Beispiele.
|
Die Online-Referenz der [unterstützten TeX-Funktionen](https://katex.org/docs/supported.html) zeigt Syntax-Beispiele.
|
||||||
|
|
||||||
## Inline-Schreibweise
|
## Inline-Schreibweise
|
||||||
|
|
||||||
Die Inline-Schreibweise kann erzeugt werden, indem der Ausdruck in die Trennzeichen `\(` und `\)` eingeschlossen wird.
|
Die Inline-Schreibweise kann erzeugt werden, indem der Ausdruck in den Shortcode `katex inline` oder `katex` eingeschlossen wird.
|
||||||
|
|
||||||
**Beispiel:**
|
**Beispiel:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX Inline-Schreibweise
|
% KaTeX Inline-Schreibweise
|
||||||
Inline-Schreibweise: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Inline-Schreibweise: {{</* katex inline */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
|
Kurzfassung: {{</* katex */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Inline-Schreibweise: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Inline-Schreibweise: {{< katex inline >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
|
Kurzfassung: {{< katex >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
## Schreibweise als Block
|
## Schreibweise als Block
|
||||||
|
|
||||||
Alternativ kann die Blockschreibweise mit Hilfe von `$$`-Trennzeichen erzeugt werden. Dadurch wird der Ausdruck in einem eigenen HTML-Block ausgegeben.
|
Alternativ kann die Blockschreibweise mit dem Parameter `block` erzeugt werden. Dadurch wird der Ausdruck in einem eigenen HTML-Block ausgegeben.
|
||||||
|
|
||||||
**Beispiel:**
|
**Beispiel:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX mit Block-Schreibweise
|
% KaTeX mit Block-Schreibweise
|
||||||
$$
|
{{</* katex block */>}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
$$
|
{{< katex block >}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{< /katex >}}
|
||||||
|
|
|
@ -9,38 +9,41 @@ Una breve muestra de notación matemática en Congo.
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
{{< katex >}}
|
Congo sólo incluirá los recursos de KaTeX en su proyecto si hace uso de la notación matemática. Para que esto funcione, congo proporciona un shortcode [`katex`]({{< ref path="docs/shortcodes#katex" lang="en" >}}) que puede usarse con `katex block` o `katex inline`.
|
||||||
|
Cualquier sintaxis KaTeX dentro del shortcode se renderizará automáticamente.
|
||||||
Congo solo incluirá los assets de KaTeX en su proyecto si utiliza notación matemática. Para que esto funcione, simplemente incluya el [`katex` shortcode]({{< ref path="docs/shortcodes#katex" lang="en" >}}) dentro del artículo. Cualquier sintaxis de KaTeX en esa página se renderizará automáticamente.
|
|
||||||
|
|
||||||
Utilice la documentación en línea de [funciones TeX admitidas](https://katex.org/docs/supported.html) para conocer la sintaxis disponible.
|
Utilice la documentación en línea de [funciones TeX admitidas](https://katex.org/docs/supported.html) para conocer la sintaxis disponible.
|
||||||
|
|
||||||
## Notación en línea
|
## Notación en línea
|
||||||
|
|
||||||
La notación en línea se puede generar envolviendo la expresión en los delimitadores `\\(` y `\\)`.
|
La notación inline puede generarse envolviendo la expresión en el shortcode `katex inline` o `katex`.
|
||||||
|
|
||||||
**Ejemplo:**
|
**Ejemplo:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX notación en línea
|
% KaTeX notación en línea
|
||||||
Notación en línea: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Notación en línea: {{</* katex inline */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
|
Versión abreviada: {{</* katex */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Notación en línea: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Notación en línea: {{< katex inline >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
|
Versión abreviada: {{< katex >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
|
|
||||||
## Notación en bloque
|
## Notación en bloque
|
||||||
|
|
||||||
Alternativamente, la notación en bloque se puede generar usando delimitadores `$$`. Esto generará la expresión en su propio bloque HTML.
|
Alternativamente, puede generarse una notación en bloque utilizando el parámetro `block`. Esto mostrará la expresión en su propio bloque HTML.
|
||||||
|
|
||||||
**Ejemplo:**
|
**Ejemplo:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX notación en bloque
|
% KaTeX notación en bloque
|
||||||
$$
|
{{</* katex block */>}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
$$
|
{{< katex block >}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{< /katex >}}
|
||||||
|
|
|
@ -9,38 +9,40 @@ tags: ["sample", "katex", "maths", "shortcodes"]
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
{{< katex >}}
|
Congoは、数学的記法を使用する場合にのみ、KaTeXアセットをプロジェクトにバンドルします。これを動作させるために、congoは `katex block` または `katex inline` で使用できるショートコード [`katex`]({{< ref path="docs/shortcodes#katex" lang="en" >}}) を提供しています。
|
||||||
|
ショートコード内のKaTeX構文は自動的にレンダリングされます。
|
||||||
|
|
||||||
Congoは、数学的表記を使用する場合にのみ、KaTeXアセットをプロジェクトにバンドルします。これを動作させるには、単に記事内に[`katex` ショートコード]({{< ref "docs/shortcodes#katex" >}})をインクルードしてください。そのページ上のKaTeX構文は自動的にレンダリングされます。
|
利用可能な構文については[サポートされているTeX関数](https://katex.org/docs/supported.html)のオンラインリファレンスを参照してください。
|
||||||
|
|
||||||
使用可能な構文については、[supported TeX functions](https://katex.org/docs/supported.html)のオンラインリファレンスを参照してください。
|
|
||||||
|
|
||||||
## インライン記法
|
## インライン記法
|
||||||
|
|
||||||
インライン記法は、式を `\\(` と `\\)` で囲むことで生成できます。
|
インライン記法は `katex inline` または `katex` ショートコードで式をラップすることで生成できる。
|
||||||
|
|
||||||
**例:**
|
**例:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX inline notation
|
% KaTeX inline notation
|
||||||
インライン記法: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
インライン記法: {{</* katex inline */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
|
速記版: {{</* katex */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
インライン記法: {{< katex inline >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
インライン記法: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
速記版: {{< katex >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
## ブロック記法
|
## ブロック記法
|
||||||
|
|
||||||
あるいは、 `$$` を使ってブロック記法で生成することもできます。これは式を独自のHTMLブロックとして出力します。
|
また、`block` パラメータを使ってブロック表記を生成することもできます。これは式を独自のHTMLブロックで出力します。
|
||||||
|
|
||||||
**例:**
|
**例:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX block notation
|
% KaTeX block notation
|
||||||
$$
|
{{</* katex block */>}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
$$
|
{{< katex block >}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{< /katex >}}
|
||||||
|
|
|
@ -9,38 +9,40 @@ KaTeX can be used to render mathematical notation within articles.
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
{{< katex >}}
|
Congo will only bundle the KaTeX assets into your project if you make use of mathematical notation. In order for this to work, congo provides a shortcode [`katex`]({{< ref "docs/shortcodes#katex" >}}) than can be used with either `katex block` or `katex inline`.
|
||||||
|
Any KaTeX syntax inside the shortcode will be automatically rendered.
|
||||||
Congo will only bundle the KaTeX assets into your project if you make use of mathematical notation. In order for this to work, simply include the [`katex` shortcode]({{< ref "docs/shortcodes#katex" >}}) within the article. Any KaTeX syntax on that page will then be automatically rendered.
|
|
||||||
|
|
||||||
Use the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
|
Use the online reference of [supported TeX functions](https://katex.org/docs/supported.html) for the available syntax.
|
||||||
|
|
||||||
## Inline notation
|
## Inline notation
|
||||||
|
|
||||||
Inline notation can be generated by wrapping the expression in `\\(` and `\\)` delimiters.
|
Inline notation can be generated by wrapping the expression in the `katex inline` or `katex` shortcode.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX inline notation
|
% KaTeX inline notation
|
||||||
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Inline notation: {{</* katex inline */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
|
Shorthand version: {{</* katex */>}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Inline notation: \\(\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…\\)
|
Inline notation: {{< katex inline >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
|
Shorthand version: {{< katex >}}\varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887…{{< /katex >}}
|
||||||
|
|
||||||
## Block notation
|
## Block notation
|
||||||
|
|
||||||
Alternatively, block notation can be generated using `$$` delimiters. This will output the expression in its own HTML block.
|
Alternatively, block notation can be generated using the `block` parameter. This will output the expression in its own HTML block.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```tex
|
```tex
|
||||||
% KaTeX block notation
|
% KaTeX block notation
|
||||||
$$
|
{{</* katex block */>}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{</* /katex */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
$$
|
{{< katex block >}}
|
||||||
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
\varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } }
|
||||||
$$
|
{{< /katex >}}
|
||||||
|
|
|
@ -64,5 +64,6 @@ The list below is just a handful of the websites that are built using the Congo
|
||||||
| [simaosilva.com](https://simaosilva.com) | Personal Site |
|
| [simaosilva.com](https://simaosilva.com) | Personal Site |
|
||||||
| [kom.al](https://kom.al) | Personal Site |
|
| [kom.al](https://kom.al) | Personal Site |
|
||||||
| [andrea.mortaro.it](https://andrea.mortaro.it) | Personal Site and Blog |
|
| [andrea.mortaro.it](https://andrea.mortaro.it) | Personal Site and Blog |
|
||||||
|
| [yoganath.me](https://yoganath.me) | Personal Site and Blog |
|
||||||
|
|
||||||
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).
|
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
article:
|
||||||
|
anchor_label: "앵커"
|
||||||
|
date: "{{ .Date }}"
|
||||||
|
date_updated: "수정됨: {{ .Date }}"
|
||||||
|
draft: "초안"
|
||||||
|
edit_title: "편집"
|
||||||
|
reading_time:
|
||||||
|
one: "{{ .Count }} 분"
|
||||||
|
other: "{{ .Count }} 분"
|
||||||
|
reading_time_title: "읽는 데 걸리는 시간"
|
||||||
|
table_of_contents: "목차"
|
||||||
|
word_count:
|
||||||
|
one: "{{ .Count }} 자"
|
||||||
|
other: "{{ .Count }} 자"
|
||||||
|
|
||||||
|
author:
|
||||||
|
byline_title: "글쓴이"
|
||||||
|
|
||||||
|
code:
|
||||||
|
copy: "복사"
|
||||||
|
copied: "복사됨"
|
||||||
|
|
||||||
|
error:
|
||||||
|
404_title: "페이지를 찾을 수 없어요 :confused:"
|
||||||
|
404_error: "Error 404"
|
||||||
|
404_description: "요청하신 페이지를 찾을 수 없어요."
|
||||||
|
|
||||||
|
footer:
|
||||||
|
dark_appearance: "다크 모드로 전환"
|
||||||
|
light_appearance: "라이트 모드로 전환"
|
||||||
|
powered_by: "Powered by {{ .Hugo }} & {{ .Congo }}"
|
||||||
|
|
||||||
|
list:
|
||||||
|
externalurl_title: "외부 사이트 링크"
|
||||||
|
no_articles: "아직 글이 존재하지 않아요."
|
||||||
|
|
||||||
|
nav:
|
||||||
|
scroll_to_top_title: "위로 스크롤"
|
||||||
|
skip_to_main: "메인 콘텐츠로 이동하기"
|
||||||
|
|
||||||
|
search:
|
||||||
|
open_button_title: "검색 (/)"
|
||||||
|
close_button_title: "닫기 (Esc)"
|
||||||
|
input_placeholder: "검색"
|
||||||
|
|
||||||
|
sharing:
|
||||||
|
email: "email로 보내기"
|
||||||
|
facebook: "Facebook에 공유하기"
|
||||||
|
linkedin: "LinkedIn에 공유하기"
|
||||||
|
mastodon: "Mastodon에 게시하기"
|
||||||
|
pinterest: "Pinterest에 핀하기"
|
||||||
|
reddit: "Reddit에 게시하기"
|
||||||
|
twitter: "Twitter에 트윗하기"
|
||||||
|
telegram: "Telegram에 공유하기"
|
||||||
|
line: "LINE에 공유하기"
|
||||||
|
|
||||||
|
shortcode:
|
||||||
|
recent_articles: "최신 글"
|
|
@ -1 +1,8 @@
|
||||||
{{/* Nothing to see here */}}
|
{{ $mode := .Get 0 }}
|
||||||
|
{{ if eq $mode "block" }}
|
||||||
|
$${{.Inner}}$$
|
||||||
|
{{ else if or (eq $mode "inline") (eq $mode nil) }}
|
||||||
|
\({{.Inner}}\)
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "Invalid katex mode: expected block or inline" }}
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -11,16 +11,16 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.1",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mermaid": "^10.6.1",
|
"mermaid": "^10.6.1",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-go-template": "^0.0.15",
|
"prettier-plugin-go-template": "^0.0.15",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.7",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"tailwindcss": "^3.3.5",
|
"tailwindcss": "^3.3.6",
|
||||||
"vendor-copy": "^3.0.1"
|
"vendor-copy": "^3.0.1"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
|
@ -338,9 +338,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/chart.js": {
|
"node_modules/chart.js": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.1.tgz",
|
||||||
"integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==",
|
"integrity": "sha512-C74QN1bxwV1v2PEujhmKjOZ7iUM4w6BWs23Md/6aOZZSlwMzeCIDGuZay++rBgChYru7/+QFeoQW0fQoP534Dg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@kurkle/color": "^0.3.0"
|
"@kurkle/color": "^0.3.0"
|
||||||
|
@ -2333,9 +2333,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
|
||||||
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
|
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin/prettier.cjs"
|
"prettier": "bin/prettier.cjs"
|
||||||
|
@ -2363,9 +2363,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier-plugin-tailwindcss": {
|
"node_modules/prettier-plugin-tailwindcss": {
|
||||||
"version": "0.5.7",
|
"version": "0.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.9.tgz",
|
||||||
"integrity": "sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==",
|
"integrity": "sha512-9x3t1s2Cjbut2QiP+O0mDqV3gLXTe2CgRlQDgucopVkUdw26sQi53p/q4qvGxMLBDfk/dcTV57Aa/zYwz9l8Ew==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.21.3"
|
"node": ">=14.21.3"
|
||||||
|
@ -2374,13 +2374,13 @@
|
||||||
"@ianvs/prettier-plugin-sort-imports": "*",
|
"@ianvs/prettier-plugin-sort-imports": "*",
|
||||||
"@prettier/plugin-pug": "*",
|
"@prettier/plugin-pug": "*",
|
||||||
"@shopify/prettier-plugin-liquid": "*",
|
"@shopify/prettier-plugin-liquid": "*",
|
||||||
"@shufo/prettier-plugin-blade": "*",
|
|
||||||
"@trivago/prettier-plugin-sort-imports": "*",
|
"@trivago/prettier-plugin-sort-imports": "*",
|
||||||
"prettier": "^3.0",
|
"prettier": "^3.0",
|
||||||
"prettier-plugin-astro": "*",
|
"prettier-plugin-astro": "*",
|
||||||
"prettier-plugin-css-order": "*",
|
"prettier-plugin-css-order": "*",
|
||||||
"prettier-plugin-import-sort": "*",
|
"prettier-plugin-import-sort": "*",
|
||||||
"prettier-plugin-jsdoc": "*",
|
"prettier-plugin-jsdoc": "*",
|
||||||
|
"prettier-plugin-marko": "*",
|
||||||
"prettier-plugin-organize-attributes": "*",
|
"prettier-plugin-organize-attributes": "*",
|
||||||
"prettier-plugin-organize-imports": "*",
|
"prettier-plugin-organize-imports": "*",
|
||||||
"prettier-plugin-style-order": "*",
|
"prettier-plugin-style-order": "*",
|
||||||
|
@ -2396,9 +2396,6 @@
|
||||||
"@shopify/prettier-plugin-liquid": {
|
"@shopify/prettier-plugin-liquid": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"@shufo/prettier-plugin-blade": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@trivago/prettier-plugin-sort-imports": {
|
"@trivago/prettier-plugin-sort-imports": {
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
|
@ -2899,9 +2896,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tailwindcss": {
|
"node_modules/tailwindcss": {
|
||||||
"version": "3.3.5",
|
"version": "3.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
|
||||||
"integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
|
"integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
|
@ -3456,9 +3453,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"chart.js": {
|
"chart.js": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.1.tgz",
|
||||||
"integrity": "sha512-vQEj6d+z0dcsKLlQvbKIMYFHd3t8W/7L2vfJIbYcfyPcRx92CsHqECpueN8qVGNlKyDcr5wBrYAYKnfu/9Q1hQ==",
|
"integrity": "sha512-C74QN1bxwV1v2PEujhmKjOZ7iUM4w6BWs23Md/6aOZZSlwMzeCIDGuZay++rBgChYru7/+QFeoQW0fQoP534Dg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@kurkle/color": "^0.3.0"
|
"@kurkle/color": "^0.3.0"
|
||||||
|
@ -4848,9 +4845,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
|
||||||
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
|
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prettier-plugin-go-template": {
|
"prettier-plugin-go-template": {
|
||||||
|
@ -4863,9 +4860,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prettier-plugin-tailwindcss": {
|
"prettier-plugin-tailwindcss": {
|
||||||
"version": "0.5.7",
|
"version": "0.5.9",
|
||||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.7.tgz",
|
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.9.tgz",
|
||||||
"integrity": "sha512-4v6uESAgwCni6YF6DwJlRaDjg9Z+al5zM4JfngcazMy4WEf/XkPS5TEQjbD+DZ5iNuG6RrKQLa/HuX2SYzC3kQ==",
|
"integrity": "sha512-9x3t1s2Cjbut2QiP+O0mDqV3gLXTe2CgRlQDgucopVkUdw26sQi53p/q4qvGxMLBDfk/dcTV57Aa/zYwz9l8Ew==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
@ -5202,9 +5199,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"tailwindcss": {
|
"tailwindcss": {
|
||||||
"version": "3.3.5",
|
"version": "3.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
|
||||||
"integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
|
"integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@alloc/quick-lru": "^5.2.0",
|
"@alloc/quick-lru": "^5.2.0",
|
||||||
|
|
|
@ -30,16 +30,16 @@
|
||||||
"homepage": "https://github.com/jpanther/congo#readme",
|
"homepage": "https://github.com/jpanther/congo#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.5.10",
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.1",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"mermaid": "^10.6.1",
|
"mermaid": "^10.6.1",
|
||||||
"prettier": "^3.1.0",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-go-template": "^0.0.15",
|
"prettier-plugin-go-template": "^0.0.15",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.7",
|
"prettier-plugin-tailwindcss": "^0.5.9",
|
||||||
"quicklink": "^2.3.0",
|
"quicklink": "^2.3.0",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"tailwindcss": "^3.3.5",
|
"tailwindcss": "^3.3.6",
|
||||||
"vendor-copy": "^3.0.1"
|
"vendor-copy": "^3.0.1"
|
||||||
},
|
},
|
||||||
"vendorCopy": [],
|
"vendorCopy": [],
|
||||||
|
|
Loading…
Reference in New Issue