docs: honing #567

This commit is contained in:
Sören Weber 2024-10-06 15:10:39 +02:00
parent eb3095f663
commit 3fa95990ee
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
5 changed files with 13 additions and 15 deletions

View file

@ -75,7 +75,9 @@ It is called interchangeably in the same way as Hugo's own shortcode by providin
You are free to also call this shortcode from your own partials. In this case it resembles Hugo's [`highlight` function](https://gohugo.io/functions/highlight/) syntax if you call it using compatibility syntax.
Codefence syntax is widely adopted in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
Codefence syntax is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
The [`tab` shortcode](shortcodes/tab/) is also capable of displaying code but with limited options.
### Parameter

View file

@ -7,7 +7,7 @@ title = "Math"
You can use [pure Markdown](content/markdown/#subscript-and-superscript) for writing simple math expressions.
If this is not enough, the `math` shortcode helps you generating math and chemical formulae using the [MathJax](https://mathjax.org/) library.
If this is not enough, the `math` shortcode helps you rendering math and chemical formulae using the [MathJax](https://mathjax.org/) library.
{{< math align="center" >}}
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
@ -54,7 +54,7 @@ $$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \
{{% /tab %}}
{{< /tabs >}}
Passthrough syntax is only available by [further configuration](#passthrough-configuration) and has limited features as it does not provide any of the below parameter. Nevertheless, it is widely adopted in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
Passthrough syntax is only available by [further configuration](#passthrough-configuration) and has limited features as it does not provide any of the below parameter. Nevertheless, it is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
### Parameter
@ -118,21 +118,15 @@ Instead of `math=true` you can also use the alias `math.force=true`.
In this case you have to [force load](#force-loading-of-the-mathjax-library) the MathJax library either in your `hugo.toml` or in your page's front matter as the theme doesn't know if math is used.
{{< multiconfig fm=true >}}
math = true
{{< /multiconfig >}}
[See the example](#passthrough-block-math) on how a passthrough configurations makes using math really easy.
## Examples
### Passthrough Block Math
With passthrough configuration you can just drop your math without enclosing it by shortcodes or codefences but no other [parameters](#parameter) are available.
With [passthrough configuration](#passthrough-configuration) enabled you can just drop your math without enclosing it by shortcodes or codefences but no other [parameters](#parameter) are available.
This is only available if you are using the [passthrough configuration](#passthrough-configuration).
Just don't forget to [force load](#force-loading-of-the-mathjax-library) the MathJax library by setting `math=true` either in your `hugo.toml` or in your page's front matter.
In this case you have to [force load](#force-loading-of-the-mathjax-library) the MathJax library by setting `math=true` either in your `hugo.toml` or in your page's front matter.
In passthrough default configuration, block math is generated if you use two consecutive `$$` as a delimiter around your formulae.

View file

@ -5,7 +5,7 @@ options = ["customMermaidURL", "mermaid.force", "mermaidInitialize", "mermaidZoo
title = "Mermaid"
+++
The `mermaid` shortcode generates diagrams and flowcharts from text in a similar manner as Markdown, using the [Mermaid](https://mermaidjs.github.io/) library.
The `mermaid` shortcode generates diagrams and flowcharts from text in a similar manner as Markdown using the [Mermaid](https://mermaidjs.github.io/) library.
````mermaid {align="center" zoom="true"}
graph LR;
@ -53,7 +53,7 @@ graph LR;
{{% /tab %}}
{{< /tabs >}}
Codefence syntax is widely adopted in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
Codefence syntax is widely available in other Markdown parsers like GitHub and therefore is the recommend syntax for generating portable Markdown.
### Parameter
@ -104,7 +104,7 @@ You can force loading the Mermaid library if no shortcode or codefence was used
### Setting a Specific Mermaid Theme
While you can configure the Mermaid theme to render your graph by using one of the [initialization options](#providing-initialization-options-for-the-mermaid-library), the recommended way is to set the default value in the `--MERMAID-theme` variable of your used [color variant](configuration/appearance/generator/). This allows your graphs to look pretty when the user switches a color variant.
While you can configure the Mermaid theme to render your graph by using one of the [initialization options](#providing-initialization-options-for-the-mermaid-library), the recommended way is to set the default value using the `--MERMAID-theme` variable in your [color variant stylesheet](configuration/appearance/generator/). This allows your graphs to look pretty when the user switches the color variant.
## Examples

View file

@ -54,7 +54,7 @@ It is all about the boxes.
{{% /tab %}}
{{< /tabs >}}
Callout syntax has limited features as it does not provide all of the below parameter. Nevertheless, it is widely adopted in other Markdown parsers like [GitHub styled alerts](/content/markdown#github-styled-alerts) or [Obsidian callouts](/content/markdown#obsidian-callouts) and therefore is the recommend syntax for generating portable Markdown.
Callout syntax has limited features as it does not provide all of the below parameter. Nevertheless, it is widely available in other Markdown parsers like with [GitHub styled alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) or [Obsidian callouts](https://help.obsidian.md/Editing+and+formatting/Callouts#Change+the+title) and therefore is the recommend syntax for generating portable Markdown.
If you want to display a transparent expandable box without any border, you can also use the [`expand` shortcode](/shortcodes/expand).

View file

@ -42,6 +42,8 @@ printf("Hello World!");
If you want multiple tabs grouped together you can wrap your tabs into the [`tabs` shortcode](shortcodes/tabs).
If you want further options when using a single code tab, you can also use the [`highlight` shortcode](shortcodes/highlight).
### Parameter
| Name | Default | Notes |