Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/monkeyWzr/hugo-theme-cactus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Hathaway <jesse@mbuki-mvuki.org>2021-05-11 17:08:51 +0300
committerJesse Hathaway <jesse@mbuki-mvuki.org>2021-05-11 17:08:51 +0300
commit7583d3c9e5d7596b291580f9a4df7f5b1be7b261 (patch)
tree2a6a0bf28bcdb841a854cf96cc853cc0ec73a880
parent2f9325922ab385d9cfc8c2ce12804a14645d05e2 (diff)
description: render as markdown
Prior to this change the description parameter was templated as a string. This made it difficult to insert links or make text bold, as the Go template engine escapes any html markup. After this change the string is rendered with .RenderString which uses the default page markup, markdown, to render the string.
-rw-r--r--README.md2
-rw-r--r--layouts/index.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 18d0456..75deeb4 100644
--- a/README.md
+++ b/README.md
@@ -75,7 +75,7 @@ weight = 4
### Homepage settings
-* description: description will be displayed in the homepage.
+* description: description will be displayed in the homepage. Markdown syntax is supported in the description string.
```toml
[params]
diff --git a/layouts/index.html b/layouts/index.html
index 6559b7e..580c47e 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,7 +1,7 @@
{{ define "main" }}
<section id="about">
{{ if isset .Site.Params "description" }}
- {{ .Site.Params.description }}
+ {{ .Site.Params.description | $.Page.RenderString }}
{{ end }}
{{ if isset .Site.Params "social" }}
<p>Find me on