Compare commits

...

20 Commits

Author SHA1 Message Date
Azkellas 5079cc4aee
Merge 98892944c4 into e615de3755 2023-11-25 00:07:14 -07:00
James Panther e615de3755
🔨 Preparing release v2.7.5 2023-11-25 15:25:37 +11:00
James Panther cd675cfc55
Merge branch 'dev' of github.com:jpanther/congo into dev 2023-11-25 15:22:53 +11:00
James Panther 088b21795c
📝 Update changelog 2023-11-25 15:22:50 +11:00
James Panther ed0408da33
🔀 Merge pull request #699 from tomy0000000/dev
🛠 fix: Empty block when locale switcher is hidden (#678)
2023-11-25 14:47:02 +11:00
James Panther e9a69ec8e0
🔀 Merge pull request #714 from sorairolake/remove-execute-permission
Remove unnecessary execute permissions
2023-11-25 14:43:16 +11:00
James Panther 090de56037
📝 Update translation docs 2023-11-25 14:42:37 +11:00
James Panther b6a532c22f
🚚 Remove sub-variant from Bulgarian translation 2023-11-25 14:37:35 +11:00
James Panther 7c9fe0ef6f
🔀 Merge pull request #718 from MrEddX/MrEddX-bulgarian
🌐 Added Bulgarian Language
2023-11-25 14:36:43 +11:00
James Panther a968a781df
🔀 Merge pull request #703 from archdron/dev
Add Ukrainian Localization
2023-11-25 14:31:10 +11:00
James Panther 515d7bcad2
🔀 Merge pull request #696 from metbril/fix-nl
Fix typo in Dutch translation
2023-11-25 14:29:06 +11:00
James Panther e92f8e55fb
🔀 Merge pull request #697 from jpanther/dependabot/npm_and_yarn/mermaid-10.6.1
📌 Bump mermaid from 10.6.0 to 10.6.1
2023-11-25 14:27:02 +11:00
dependabot[bot] ca67e579a9 📦 Update packaged Mermaid 2023-11-25 03:25:03 +00:00
dependabot[bot] 99c45443cf
📌 Bump mermaid from 10.6.0 to 10.6.1
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.6.0 to 10.6.1.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.6.0...v10.6.1)

---
updated-dependencies:
- dependency-name: mermaid
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-25 03:24:44 +00:00
MrEddX 56c7c9a466
Create bg-BG.yaml
Added: Bulgarian Language
2023-11-24 22:36:33 +02:00
Shun Sakai ef51b7c6de Remove unnecessary execute permissions 2023-11-21 11:07:11 +09:00
Andrii Serbovets 1e5a789156 Add Ukrainian Localization
- initial Ukrainian localization
- the “few” and “many” forms added as appropriate
2023-11-10 20:06:26 +02:00
Tomy Hsieh 0109db6173
🛠 fix: Empty block when locale switcher is hidden (#678) 2023-11-08 16:49:08 -05:00
Robert van Bregt 0cfab5dabb Fix typo 2023-11-06 19:17:06 +01:00
Etienne 98892944c4 Properly render KaTeX formulas
Add block and inline parameter to katex shortcode to encapsulate
katex notation
2023-10-01 13:03:05 +02:00
53 changed files with 250 additions and 82 deletions

View File

@ -6,6 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
## [2.7.5] - 2023-11-25
### Added
- Ukrainian translation ([#703](https://github.com/jpanther/congo/pull/703))
- Bulgarian translation ([#718](https://github.com/jpanther/congo/pull/718))
### Changed
- Updated Dutch translation ([#696](https://github.com/jpanther/congo/pull/696))
- Upgrade to Mermaid v10.6.1 ([#697](https://github.com/jpanther/congo/pull/697))
### Fixed
- Some files have unnecessary execute permissions ([#714](https://github.com/jpanther/congo/pull/714))
- Empty block is output when locale switcher is hidden ([#699](https://github.com/jpanther/congo/pull/699))
## [2.7.4] - 2023-11-05 ## [2.7.4] - 2023-11-05
### Fixed ### Fixed
@ -52,6 +69,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
@ -780,7 +798,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Advanced customisation using simple Tailwind colour definitions and styles - Advanced customisation using simple Tailwind colour definitions and styles
- Fully documented - Fully documented
[Unreleased]: https://github.com/jpanther/congo/compare/v2.7.4...HEAD [Unreleased]: https://github.com/jpanther/congo/compare/v2.7.5...HEAD
[2.7.5]: https://github.com/jpanther/congo/compare/v2.7.4...v2.7.5
[2.7.4]: https://github.com/jpanther/congo/compare/v2.7.3...v2.7.4 [2.7.4]: https://github.com/jpanther/congo/compare/v2.7.3...v2.7.4
[2.7.3]: https://github.com/jpanther/congo/compare/v2.7.2...v2.7.3 [2.7.3]: https://github.com/jpanther/congo/compare/v2.7.2...v2.7.3
[2.7.2]: https://github.com/jpanther/congo/compare/v2.7.1...v2.7.2 [2.7.2]: https://github.com/jpanther/congo/compare/v2.7.1...v2.7.2

View File

@ -1,4 +1,4 @@
/*! Congo v2.7.4 | MIT License | https://github.com/jpanther/congo */ /*! Congo v2.7.5 | MIT License | https://github.com/jpanther/congo */
/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com */ /*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com */

View File

@ -1,4 +1,4 @@
/*! Congo v2.7.4 | MIT License | https://github.com/jpanther/congo */ /*! Congo v2.7.5 | MIT License | https://github.com/jpanther/congo */
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;

File diff suppressed because one or more lines are too long

0
exampleSite/content/_index.es.md 100755 → 100644
View File

0
exampleSite/content/_index.md 100755 → 100644
View File

View File

View File

@ -53,6 +53,7 @@ Congoは現在、以下の言語に対応しています:
| :gb: **English (default)** | `en` | | :gb: **English (default)** | `en` |
| :egypt: Arabic | `ar` | | :egypt: Arabic | `ar` |
| :bangladesh: Bengali | `bn` | | :bangladesh: Bengali | `bn` |
| :bulgaria: Bulgarian | `bg` |
| :cn: Chinese - Simplified (China) | `zh-cn` | | :cn: Chinese - Simplified (China) | `zh-cn` |
| :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` | | :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` |
| :flag-cz: Czech | `cs` | | :flag-cz: Czech | `cs` |
@ -73,6 +74,7 @@ Congoは現在、以下の言語に対応しています:
| :slovakia: Slovak | `sk` | | :slovakia: Slovak | `sk` |
| :es: Spanish (Spain) | `es` | | :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` | | :tr: Turkish | `tr` |
| :ukraine: Ukrainian | `uk` |
翻訳文字列を含むカスタムファイルを `i18n/[code].yaml` に作成することでデフォルトの翻訳をオーバーライドできます。このメソッドを使って新しい言語を追加することもできます。新しい翻訳をコミュニティと共有したい場合、[Pull Request](https://github.com/jpanther/congo/pulls)を作ってください。 翻訳文字列を含むカスタムファイルを `i18n/[code].yaml` に作成することでデフォルトの翻訳をオーバーライドできます。このメソッドを使って新しい言語を追加することもできます。新しい翻訳をコミュニティと共有したい場合、[Pull Request](https://github.com/jpanther/congo/pulls)を作ってください。

View File

@ -53,6 +53,7 @@ The theme currently supports the following languages out of the box:
| :gb: **English (default)** | `en` | | :gb: **English (default)** | `en` |
| :egypt: Arabic | `ar` | | :egypt: Arabic | `ar` |
| :bangladesh: Bengali | `bn` | | :bangladesh: Bengali | `bn` |
| :bulgaria: Bulgarian | `bg` |
| :cn: Chinese - Simplified (China) | `zh-cn` | | :cn: Chinese - Simplified (China) | `zh-cn` |
| :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` | | :taiwan: Chinese - Traditional (Taiwan) | `zh-tw` |
| :flag-cz: Czech | `cs` | | :flag-cz: Czech | `cs` |
@ -73,6 +74,7 @@ The theme currently supports the following languages out of the box:
| :slovakia: Slovak | `sk` | | :slovakia: Slovak | `sk` |
| :es: Spanish (Spain) | `es` | | :es: Spanish (Spain) | `es` |
| :tr: Turkish | `tr` | | :tr: Turkish | `tr` |
| :ukraine: Ukrainian | `uk` |
The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls). The default translations can be overridden by creating a custom file in `i18n/[code].yaml` that contains the translation strings. You can also use this method to add new languages. If you'd like to share a new translation with the community, please [open a pull request](https://github.com/jpanther/congo/pulls).

View File

@ -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" >}})でより多くの例をチェックしてください。

View File

@ -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.

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
exampleSite/content/samples/external/index.md vendored 100755 → 100644
View File

View File

View File

View File

View File

@ -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 >}}

View File

@ -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 >}}

View File

@ -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 >}}

View File

@ -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 >}}

View File

56
i18n/bg.yaml 100644
View File

@ -0,0 +1,56 @@
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: "Грешка 404"
404_description: "Изглежда, че страницата, която търсите не съществува."
footer:
dark_appearance: "Превключи към тъмна тема"
light_appearance: "Превключи към светла тема"
powered_by: "Осъществено чрез {{ .Hugo }} &amp; {{ .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: "Изпращане по имейл"
facebook: "Споделяне във Facebook"
linkedin: "Споделяне в LinkedIn"
mastodon: "Публикуване в Mastodon"
pinterest: "Пин в Pinterest"
reddit: "Публикуване в Reddit"
twitter: "Туит в Twitter"
shortcode:
recent_articles: "Последни"

View File

@ -1,7 +1,7 @@
article: article:
anchor_label: "Anker" anchor_label: "Anker"
date: "{{ .Date }}" date: "{{ .Date }}"
date_updated: "Bijgwerkt: {{ .Date }}" date_updated: "Bijgewerkt: {{ .Date }}"
draft: "Concept" draft: "Concept"
edit_title: "Bewerk inhoud" edit_title: "Bewerk inhoud"
reading_time: reading_time:

60
i18n/uk.yaml 100644
View File

@ -0,0 +1,60 @@
article:
anchor_label: "Закладка"
date: "{{ .Date }}"
date_updated: "Оновлено {{ .Date }}"
draft: "Чернетка"
edit_title: "Редагувати"
reading_time:
one: "{{ .Count }} хвилину"
few: "{{ .Count }} хвилини"
many: "{{ .Count }} хвилин"
other: "{{ .Count }} хвилини"
reading_time_title: "Прочитаєте за"
table_of_contents: "Зміст"
word_count:
one: "{{ .Count }} слово"
few: "{{ .Count }} слова"
many: "{{ .Count }} слів"
other: "{{ .Count }} слова"
author:
byline_title: "Автор"
code:
copy: "Копіювати"
copied: "Скопійовано"
error:
404_title: "Немає такої сторінки :confused:"
404_error: "Помилка 404"
404_description: "Здається, сторінки, яка вам потрібна, не існує."
footer:
dark_appearance: "Увімкнути темний режим"
light_appearance: "Увімкнути світлий режим"
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: "Надіслати електронною поштою"
facebook: "Поширити на Facebook"
linkedin: "Поширити на LinkedIn"
mastodon: "Поширити на Mastodon"
pinterest: "Зберегти на Pinterest"
reddit: "Опублікувати на Reddit"
twitter: "Поширити на Twitter"
shortcode:
recent_articles: "Недавні дописи"

View File

@ -4,7 +4,7 @@
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400"> <nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
<ul class="flex flex-col list-none sm:flex-row"> <ul class="flex flex-col list-none sm:flex-row">
{{ range .Site.Menus.footer }} {{ range .Site.Menus.footer }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group text-end sm:mb-0 sm:me-7 sm:last:me-0">

View File

@ -9,7 +9,7 @@
<ul class="flex flex-col list-none text-end sm:flex-row"> <ul class="flex flex-col list-none text-end sm:flex-row">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5"> <li class="group mb-1 sm:mb-0 sm:me-7 sm:last:me-0.5">

View File

@ -25,7 +25,7 @@
</li> </li>
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group"> <li class="mb-1 group">

View File

@ -25,7 +25,7 @@
</li> </li>
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group"> <li class="mb-1 group">
@ -129,7 +129,7 @@
<ul class="flex-row hidden list-none text-end sm:flex"> <ul class="flex-row hidden list-none text-end sm:flex">
{{ if .Site.Menus.main }} {{ if .Site.Menus.main }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
{{ if and (eq .Params.action "locale") (and (not page.IsTranslated) (not site.IsMultiLingual)) }} {{ if and (eq .Params.action "locale") (or (not page.IsTranslated) (not site.IsMultiLingual)) }}
{{ continue }} {{ continue }}
{{ end }} {{ end }}
<li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0"> <li class="mb-1 group sm:mb-0 sm:me-7 sm:last:me-0">

View File

@ -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 }}

14
package-lock.json generated
View File

@ -14,7 +14,7 @@
"chart.js": "^4.4.0", "chart.js": "^4.4.0",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
"katex": "^0.16.9", "katex": "^0.16.9",
"mermaid": "^10.6.0", "mermaid": "^10.6.1",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"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.7",
@ -1489,9 +1489,9 @@
} }
}, },
"node_modules/mermaid": { "node_modules/mermaid": {
"version": "10.6.0", "version": "10.6.1",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.6.0.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.6.1.tgz",
"integrity": "sha512-Hcti+Q2NiWnb2ZCijSX89Bn2i7TCUwosBdIn/d+u63Sz7y40XU6EKMctT4UX4qZuZGfKGZpfOeim2/KTrdR7aQ==", "integrity": "sha512-Hky0/RpOw/1il9X8AvzOEChfJtVvmXm+y7JML5C//ePYMy0/9jCEmW1E1g86x9oDfW9+iVEdTV/i+M6KWRNs4A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@braintree/sanitize-url": "^6.0.1", "@braintree/sanitize-url": "^6.0.1",
@ -4221,9 +4221,9 @@
"dev": true "dev": true
}, },
"mermaid": { "mermaid": {
"version": "10.6.0", "version": "10.6.1",
"resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.6.0.tgz", "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-10.6.1.tgz",
"integrity": "sha512-Hcti+Q2NiWnb2ZCijSX89Bn2i7TCUwosBdIn/d+u63Sz7y40XU6EKMctT4UX4qZuZGfKGZpfOeim2/KTrdR7aQ==", "integrity": "sha512-Hky0/RpOw/1il9X8AvzOEChfJtVvmXm+y7JML5C//ePYMy0/9jCEmW1E1g86x9oDfW9+iVEdTV/i+M6KWRNs4A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@braintree/sanitize-url": "^6.0.1", "@braintree/sanitize-url": "^6.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "hugo-congo-theme", "name": "hugo-congo-theme",
"version": "2.7.4", "version": "2.7.5",
"description": "Congo theme for Hugo", "description": "Congo theme for Hugo",
"scripts": { "scripts": {
"preinstall": "rimraf assets/lib", "preinstall": "rimraf assets/lib",
@ -33,7 +33,7 @@
"chart.js": "^4.4.0", "chart.js": "^4.4.0",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
"katex": "^0.16.9", "katex": "^0.16.9",
"mermaid": "^10.6.0", "mermaid": "^10.6.1",
"prettier": "^3.1.0", "prettier": "^3.1.0",
"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.7",

0
static/android-chrome-192x192.png 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

0
static/android-chrome-512x512.png 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

0
static/apple-touch-icon.png 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
static/favicon-16x16.png 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

0
static/favicon-32x32.png 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 307 B

After

Width:  |  Height:  |  Size: 307 B

0
static/favicon.ico 100755 → 100644
View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
static/site.webmanifest 100755 → 100644
View File