Hello everyone,
I have added comments to my config.toml
.
In the documentaion of the website I want to include this config.toml
as source file for viewing.
I use the shortcode include-as-code.html
.
Why does the output appear as (partially) rendered markdown instead of source code?
What am I doing wrong?
Many thanks for your time and best regards
Shortcode `include-as-code.html`
{{ $file := .Get 0 }}
{{ $plain := print ($file | readFile) }}
<figure>
<pre><code>
{{ $plain }}
</code></pre>
<figcaption>
Quelldatei: {{ $file }}
</figcaption>
</figure>
config.toml
#
# ra-master
# hugo 0.92.1
#
#baseURL = "http://localhost:1313/"
baseURL = ""
languageCode = "de"
#relativeURLs = "false"
relativeURLs = "true"
uglyURLs = "true"
#uglyURLs = "false"
theme = "ra-master"
title = "ra-master"
# enableInlineShortcodes ermöglicht die Nutzung von Code direkt in der Contentdatei
# Syntax: {{< time.inline >}}{{ now }}{{< /time.inline >}}
enableInlineShortcodes = true
# enableEmoji ermöglicht die Nutzung von Emojis "I :heart: you!"
# Verfübare Emojis: `https://www.webfx.com/tools/emoji-cheat-sheet/`
enableEmoji = true
# Selbstdefinierte Parameter, Variablen, Daten oder was auch immer
[params]
testvariable = "Inhalt der site-weiten Testvariablen aus config.toml."
[markup.goldmark.renderer]
# unsafe ermöglicht die Nutzung von HTML in der Contentdatei
unsafe = true
# Einstellung ermöglicht das Anhängen von Klassen mittels {{ .myClass }} an Überschriften und Blockelemente
[markup.goldmark.parser.attribute]
block = true
title = true
[taxonomies]
tag = "tags"
[outputs]
home = ["HTML", "RSS", "JSON"]
</details>