diff options
author | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2021-05-11 17:08:51 +0300 |
---|---|---|
committer | Jesse Hathaway <jesse@mbuki-mvuki.org> | 2021-05-11 17:08:51 +0300 |
commit | 7583d3c9e5d7596b291580f9a4df7f5b1be7b261 (patch) | |
tree | 2a6a0bf28bcdb841a854cf96cc853cc0ec73a880 | |
parent | 2f9325922ab385d9cfc8c2ce12804a14645d05e2 (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.md | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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 |