From 81988b477a437266b26c0e80b1a6deacd20ba1f9 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 21 Feb 2021 14:27:54 +0100 Subject: [PATCH] replace missing markdownify by RenderString --- exampleSite/content/shortcodes/includes.md | 2 +- layouts/shortcodes/img.html | 2 +- layouts/shortcodes/include.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exampleSite/content/shortcodes/includes.md b/exampleSite/content/shortcodes/includes.md index 8fca752..fb428b6 100644 --- a/exampleSite/content/shortcodes/includes.md +++ b/exampleSite/content/shortcodes/includes.md @@ -32,7 +32,7 @@ Attributes: ### Include \*.md file -Included markdown files will be rendered using the `markdownify` filter. +Included markdown files will be rendered using the `RenderString` [function](https://gohugo.io/functions/renderstring/). {{< hint warning >}} **Location of markdown files**\ diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 4ce0085..fcf2189 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -33,7 +33,7 @@ {{ end }}/> {{ with $caption }} -
{{ . }}{{ with $source.Params.credits }} ({{ . | markdownify }}){{ end }}
+
{{ . }}{{ with $source.Params.credits }} ({{ . | $.Page.RenderString }}){{ end }}
{{ end }} diff --git a/layouts/shortcodes/include.html b/layouts/shortcodes/include.html index 0a9df6f..a3969ac 100644 --- a/layouts/shortcodes/include.html +++ b/layouts/shortcodes/include.html @@ -1,4 +1,4 @@ -{{$file := .Get "file"}} +{{ $file := .Get "file" }}
{{- if eq (.Get "markdown") "true" -}} {{- $file | readFile | $.Page.RenderString -}}