Skip to content

Commit

Permalink
docs: remove limitation on guessSyntax
Browse files Browse the repository at this point in the history
seems to be fixed in Hugo 0.93.0?
  • Loading branch information
McShelby committed Nov 23, 2023
1 parent 286b6a1 commit ee77892
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 41 deletions.
5 changes: 0 additions & 5 deletions exampleSite/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ title = "Hugo Relearn Theme"
# not use it; visually both layouts have the same look and behavior
lineNumbersInTable = false

# if `guessSyntax = true`, there will be no unstyled code even if no language
# was given BUT Mermaid and Math codefences will not work anymore! So this is a
# mandatory setting for your site if you want to use Mermaid or Math codefences
guessSyntax = false

# the shipped variants come with their own modified chroma syntax highlightning
# style which is imported in theme-relearn-light.css, theme-relearn-dark.css, etc.;
# if you want to use a predefined style instead:
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/migration/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ This document shows you what's new in the latest release and flags it with one o

## 2.5.0 (2021-10-08) {#250}

- {{% badge style="note" title=" " %}}Change{{% /badge %}} New colors `--CODE-BLOCK-color` and `--CODE-BLOCK-BG-color` were added to provide a fallback for Hugos syntax highlighting in case `guessSyntax=true` is set. Ideally the colors are set to the same values as the ones from your chosen chroma style.
- {{% badge style="note" title=" " %}}Change{{% /badge %}} New colors `--CODE-BLOCK-color` and `--CODE-BLOCK-BG-color` were added to provide a fallback for Hugos syntax highlighting in case no language was given or the language is unsupported. Ideally the colors are set to the same values as the ones from your chosen chroma style.

---

Expand Down
5 changes: 0 additions & 5 deletions exampleSite/content/shortcodes/highlight.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ Default values for extension options can be set via params settings in your `con
# use inline; besides that visually both layouts have the same look and behavior
lineNumbersInTable = false

# if `guessSyntax = true`, there will be no unstyled code even if no language
# was given BUT Mermaid and Math codefences will not work anymore! So this is a
# mandatory setting for your site if you want to use Mermaid or Math codefences
guessSyntax = false

# the shipped variants come with their own modified chroma syntax highlightning
# style which is imported in theme-relearn-light.css, theme-relearn-dark.css, etc.;
# if you want to use a predefined style instead:
Expand Down
15 changes: 0 additions & 15 deletions exampleSite/content/shortcodes/math.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ While the examples are using shortcodes with named parameter it is recommended t

You are free to also call this shortcode from your own partials.

{{% notice note %}}
To use codefence syntax you have to turn off `guessSyntax` for the `markup.highlight` setting ([see the configuration section](#configuration)).
{{% /notice %}}

{{< tabs groupid="shortcode-parameter">}}
{{% tab title="codefence" %}}

Expand Down Expand Up @@ -71,22 +67,11 @@ The JSON object of your `config.toml` / frontmatter is forwarded into MathJax's

See [MathJax documentation](https://docs.mathjax.org/en/latest/options/index.html) for all allowed settings.

{{% notice note %}}
To use codefence syntax you have to turn off `guessSyntax` for the `markup.highlight` setting.
{{% /notice %}}

### Global Configuration File

````toml
[params]
mathJaxInitialize = "{ \"chtml\": { \"displayAlign\": \"left\" } }"

[markup]
[markup.highlight]
# if `guessSyntax = true`, there will be no unstyled code even if no language
# was given BUT Mermaid and Math codefences will not work anymore! So this is a
# mandatory setting for your site if you want to use Math codefences
guessSyntax = false
````

### Page's Frontmatter
Expand Down
15 changes: 0 additions & 15 deletions exampleSite/content/shortcodes/mermaid.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ While the examples are using shortcodes with named parameter it is recommended t

You are free to also call this shortcode from your own partials.

{{% notice note %}}
To use codefence syntax you have to turn off `guessSyntax` for the `markup.highlight` setting ([see the configuration section](#configuration)).
{{% /notice %}}

{{< tabs groupid="shortcode-parameter">}}
{{% tab title="codefence" %}}

Expand Down Expand Up @@ -83,23 +79,12 @@ See [Mermaid documentation](https://mermaid-js.github.io/mermaid/#/Setup?id=merm

The `theme` setting can also be set by your used color variant. This will be the sitewide default and can - again - be overridden by your settings in `config.toml`, frontmatter or diagram directives.

{{% notice note %}}
To use codefence syntax you have to turn off `guessSyntax` for the `markup.highlight` setting.
{{% /notice %}}

### Global Configuration File

````toml
[params]
mermaidInitialize = "{ \"theme\": \"dark\" }"
mermaidZoom = true

[markup]
[markup.highlight]
# if `guessSyntax = true`, there will be no unstyled code even if no language
# was given BUT Mermaid and Math codefences will not work anymore! So this is a
# mandatory setting for your site if you want to use Mermaid codefences
guessSyntax = false
````

### Page's Frontmatter
Expand Down

0 comments on commit ee77892

Please sign in to comment.