landing page with excerpt of about page

This commit is contained in:
acarril 2023-04-28 13:23:48 -04:00
parent 3286754ceb
commit fafb8148f3
2 changed files with 14 additions and 3 deletions

View file

@ -1,4 +1,8 @@
{{ define "main" }}
{{ .Content }}
{{- partial "posts.html" . -}}
{{ end }}
<article>
<header id="post-header">
{{- partial "about_excerpt.html" . -}}
</header>
{{ .Content }}
</article>
{{ end }}

View file

@ -0,0 +1,7 @@
{{ 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) }}