re-organize about_excerpt partial and index

This commit is contained in:
acarril 2023-04-28 14:27:07 -04:00
parent c51225fc22
commit 9024d547e2
2 changed files with 4 additions and 5 deletions

View file

@ -1,8 +1,11 @@
{{ define "main" }}
<article>
<header id="post-header">
{{- partial "about_excerpt.html" . -}}
{{ if eq .RelPermalink "/" }}
<h1 style="visibility:hidden;">&nbsp;</h1>
{{ end }}
</header>
{{- partial "about_excerpt.html" . -}}
{{ .Content }}
</article>
{{ end }}

View file

@ -1,7 +1,3 @@
{{ if eq .RelPermalink "/" }}
<h1 style="visibility:hidden;">&nbsp;</h1>
<div></div>
{{ end }}
{{ $about := .Site.GetPage "about" }}
{{ $firstParagraph := (findRE "<p>.*?</p>" ($about.Content) 1) }}
{{ safeHTML (index $firstParagraph 0) }}