mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 12:40:39 +00:00
fix: replace markdownify with renderString to use render hooks
This commit is contained in:
parent
81bd7f2549
commit
582d84408e
BIN
exampleSite/content/posts/post-with-images/images/feature.jpg
Normal file
BIN
exampleSite/content/posts/post-with-images/images/feature.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 182 KiB |
@ -8,6 +8,10 @@ tags:
|
||||
- Open Source
|
||||
- Development
|
||||
resources:
|
||||
- name: feature
|
||||
src: "images/feature.jpg"
|
||||
params:
|
||||
credits: "[Angelina Litvin](https://unsplash.com/@linalitvina) on [Unsplash](https://unsplash.com/s/photos/writing)"
|
||||
- name: testimage
|
||||
src: "images/testimage.jpg"
|
||||
title: This is a test image
|
||||
|
@ -51,7 +51,7 @@
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
|
||||
{{ $desc := .Description | default "" }}
|
||||
{{ $description := (cond (eq "" $desc) "" (printf "<blockquote>%s</blockquote>" ($desc | markdownify))) }}
|
||||
{{ $description := (cond (eq "" $desc) "" (printf "<blockquote>%s</blockquote>" ($desc | $.Page.RenderString))) }}
|
||||
{{ printf `<content type="html"><![CDATA[%s%s]]></content>` $description .Content | safeHTML }}
|
||||
{{ with .Site.Taxonomies }}
|
||||
{{ range $taxo,$_ := . }} <!-- Defaults taxos: "tags", "categories" -->
|
||||
|
@ -10,7 +10,7 @@
|
||||
<img src="{{ $featured.Permalink }}" alt="{{ default $.Title .Params.description }}" >
|
||||
</picture>
|
||||
{{ with $source.Params.credits }}
|
||||
<span>Credits: {{ . | markdownify | safeHTML }}</span>
|
||||
<span>Credits: {{ . | $.Page.RenderString | safeHTML }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="gblog-columns flex flex-wrap">
|
||||
{{ range split .Inner "<--->" }}
|
||||
<div class="gblog-columns__content gblog-markdown--nested flex-even">
|
||||
{{ . | markdownify }}
|
||||
{{ . | $.Page.RenderString }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -6,6 +6,6 @@
|
||||
</label>
|
||||
<input id="{{ $id }}-{{ .Ordinal }}" type="checkbox" class="gblog-expand__control hidden" />
|
||||
<div class="gblog-markdown--nested gblog-expand__content">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | $.Page.RenderString }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<blockquote class="gblog-hint {{ .Get 0 }}">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | $.Page.RenderString }}
|
||||
</blockquote>
|
||||
|
@ -31,7 +31,7 @@
|
||||
{{ end }}/>
|
||||
</a>
|
||||
{{ with $caption }}
|
||||
<figcaption>{{ . }}{{ with $source.Params.credits }} ({{ . | markdownify }}){{ end }}</figcaption>
|
||||
<figcaption>{{ . }}{{ with $source.Params.credits }} ({{ . | $.Page.RenderString }}){{ end }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
{{ $tab.Name }}
|
||||
</label>
|
||||
<div class="gblog-markdown--nested gblog-tabs__content">
|
||||
{{ .Content | markdownify }}
|
||||
{{ .Content | $.Page.RenderString }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user