mirror of
https://github.com/LukasJoswiak/etch.git
synced 2024-05-16 21:28:31 -04:00
landing page with excerpt of about page
This commit is contained in:
parent
3286754ceb
commit
fafb8148f3
|
@ -1,4 +1,8 @@
|
|||
{{ define "main" }}
|
||||
{{ .Content }}
|
||||
{{- partial "posts.html" . -}}
|
||||
{{ end }}
|
||||
<article>
|
||||
<header id="post-header">
|
||||
{{- partial "about_excerpt.html" . -}}
|
||||
</header>
|
||||
{{ .Content }}
|
||||
</article>
|
||||
{{ end }}
|
7
layouts/partials/about_excerpt.html
Normal file
7
layouts/partials/about_excerpt.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ if eq .RelPermalink "/" }}
|
||||
<h1 style="visibility:hidden;"> </h1>
|
||||
<div></div>
|
||||
{{ end }}
|
||||
{{ $about := .Site.GetPage "about" }}
|
||||
{{ $firstParagraph := (findRE "<p>.*?</p>" ($about.Content) 1) }}
|
||||
{{ safeHTML (index $firstParagraph 0) }}
|
Loading…
Reference in a new issue