From f6ecef75719255078b1f02eed0ff6331ec70020c Mon Sep 17 00:00:00 2001 From: Hauke Stieler Date: Thu, 29 Jul 2021 21:32:10 +0200 Subject: Use newer .RenderString and open links in new tab by default --- layouts/_default/_markup/render-link.html | 1 + layouts/_default/li.html | 2 +- layouts/shortcodes/imgScale.html | 2 +- layouts/shortcodes/note.html | 2 +- theme.toml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 layouts/_default/_markup/render-link.html diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html new file mode 100644 index 0000000..a9457c0 --- /dev/null +++ b/layouts/_default/_markup/render-link.html @@ -0,0 +1 @@ +{{ .Text }} diff --git a/layouts/_default/li.html b/layouts/_default/li.html index 9109620..b6af265 100644 --- a/layouts/_default/li.html +++ b/layouts/_default/li.html @@ -14,7 +14,7 @@ {{ if (isset .Params "summary") }}
-

{{ markdownify .Params.Summary }}

+

{{ .Params.Summary | .Page.RenderString }}

{{ i18n "readMore" }} diff --git a/layouts/shortcodes/imgScale.html b/layouts/shortcodes/imgScale.html index 9684c5a..e25713f 100644 --- a/layouts/shortcodes/imgScale.html +++ b/layouts/shortcodes/imgScale.html @@ -23,7 +23,7 @@

- {{ markdownify $subtitle }} ({{ printf "%.*f" 2 (div (len $originalImage.Content) 1000000.0) }}MB) + {{ $subtitle | .Page.RenderString }} ({{ printf "%.*f" 2 (div (len $originalImage.Content) 1000000.0) }}MB)

diff --git a/layouts/shortcodes/note.html b/layouts/shortcodes/note.html index 6ab3a25..b826c90 100644 --- a/layouts/shortcodes/note.html +++ b/layouts/shortcodes/note.html @@ -1,3 +1,3 @@
- {{ .Inner | markdownify }} + {{ .Inner | .Page.RenderString }}
diff --git a/theme.toml b/theme.toml index 10502cd..28af248 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "Simple and clean blog theme for hugo" homepage = "https://github.com/hauke96/hugo-theme-hamburg" tags = ["blog", "tags", "bootstrap", "multilingual", "clean", "minimal", "disqus", "font awesome", "mobile"] repo = "https://github.com/hauke96/hugo-theme-hamburg" -min_version = "0.57" +min_version = "0.62" [author] name = "Hauke Stieler" -- cgit v1.2.3