include _index.html in autogenerated pages, remove 'time to read' estimates
This commit is contained in:
parent
b10b9143d6
commit
4193a15b0e
3 changed files with 15 additions and 8 deletions
|
@ -1,6 +1,11 @@
|
|||
{{ define "main" -}}
|
||||
<ul class="posts">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div class="homepage-content">
|
||||
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{ range .Data.Pages -}}
|
||||
<li>
|
||||
<div class="flex">
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
<h1 class="title">{{ .Title }}</h1>
|
||||
{{ with .Params.tagline }}<span class="tagline">{{ . }}</span>{{ end }}
|
||||
|
||||
{{ if ne .Type "page" -}}
|
||||
<div class="post-date">
|
||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> <span class="readtime">· {{ .ReadingTime }} min read</span>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
<div>
|
||||
{{ .Content }}
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
{{ define "main" -}}
|
||||
<div class="homepage-content">
|
||||
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<h2>Latest Updates</h2>
|
||||
<div class="posts">
|
||||
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
|
||||
{{- $paginator := .Paginate $pages -}}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
<article class="post">
|
||||
<h1 class="post-title">
|
||||
<h3>
|
||||
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||
</h1>
|
||||
</h3>
|
||||
|
||||
<div class="post-date">
|
||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
|
||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -25,4 +30,6 @@
|
|||
</div>
|
||||
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue