Create paige_content.html
This commit is contained in:
@@ -36,9 +36,7 @@
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
{{ if .Site.Social }}
|
||||
<section>
|
||||
<div class="pb-3 text-center">
|
||||
|
3
layouts/partials/paige_content.html
Normal file
3
layouts/partials/paige_content.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{ if .Content }}
|
||||
{{ .Content | replaceRE `(<h[1-9] id="([^"]+)".+)(</h[1-9]+>)` `${1}<a class="headerlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
|
||||
{{ end }}
|
@@ -13,6 +13,4 @@
|
||||
{{ if .PublishDate }}
|
||||
<p class="text-center text-muted"><time datetime="{{ .PublishDate.Format `2006-01-02` }}">{{ .PublishDate.Format "January 2, 2006" }}</time></p>
|
||||
{{ end }}
|
||||
{{ if .Content }}
|
||||
{{ .Content | replaceRE `(<h[1-9] id="([^"]+)".+)(</h[1-9]+>)` `${1}<a class="headerlink" href="#${2}"><i class="bi bi-link-45deg small"></i></a>${3}` | safeHTML }}
|
||||
{{ end }}
|
||||
{{ partial "paige_content.html" . }}
|
||||
|
Reference in New Issue
Block a user