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 -}}