diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 256ee5d..ee45fdc 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,43 +3,16 @@ {{ .Content }} <div class="title-header"> <h1>{{ .Title }}</h1> + {{ with .OutputFormats.Get "rss" -}} + <a href="{{ .Permalink | safeURL }}">RSS</a> + {{ end }} </div> - {{- if gt (len .Sections) 0 }} - <h2>Categories</h2> - <ul class="section-list"> - {{- range .Sections }} - <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li> - {{- end }} + <ul> + {{ range .Pages }} + <li> + <time>{{ .Date.Format "2006/01/02" }}</time> + <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> + </li> + {{ end }} </ul> - <h2>All Posts</h2> - {{- end }} - {{- $cs := .CurrentSection }} - {{- with $cs }} - {{- range (where .Site.RegularPages "Section" .Section) }} - {{- if .IsDescendant $cs }} - <article class="all-list"> - <div class="title-list"> - <h3><a href="{{ .RelPermalink }}">{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</a></h3> - <div class="title-list-date"> - {{- if eq .Date.IsZero false }} - <time>{{ .Date.Format "Monday, January 2, 2006" }}</time> - {{- end }} - {{- if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }} - (updated) - {{- end }} - </div> - </div> - <div class="body-list"> - <p></p> {{/* Spacing is weird if we don't include this */}} - <p> - {{ .Summary }} - </p> - {{- if .Truncated }} - <a href="{{ .RelPermalink }}">Read More…</a> - {{- end }} - </div> - </article> - {{- end }} - {{- end }} - {{- end }} {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4c3f409..72d8ddf 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -11,7 +11,13 @@ {{range .Params.tags}} <a class="btn" href="/tags/{{ . | urlize }}" role="button">{{ . }}</a> {{end}} - {{end}} + {{end}} + {{ if .Params.categories }} + │ + {{range .Params.categories}} + <a class="btn" href="/categories/{{ . | urlize }}" role="button">{{ . }}</a> + {{end}} + {{end}} {{- if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }} — last updated <time>{{ .Lastmod.Format "January 2, 2006" }}</time> {{- end }} diff --git a/layouts/index.html b/layouts/index.html index c4d3f4c..0ac21a2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,31 +1,12 @@ {{ define "main" }} {{ .Content }} - {{ if gt ( len ( where .Site.RegularPages "Section" "posts" )) 0 }} - <h2>Recent Posts</h2> - {{ range first 2 ( where .Site.RegularPages "Section" "posts" ) }} - <article class="all-list"> - <div class="title-list"> - <h3><a href="{{ .RelPermalink }}">{{ if .Draft }}<i>(Draft)</i> {{ end }}{{ .Title }}</a></h3> - <div class="title-list-date"> - {{ if eq .Date.IsZero false }} - <time>{{ .Date.Format "Monday, January 2, 2006" }}</time> - {{ end }} - {{ if (and (eq .Lastmod.IsZero false) (ne .Lastmod .Date)) }} - (updated) - {{ end }} - </div> - </div> - <div class="body-list"> - <p></p> {{/* Spacing is weird if we don't include this */}} - <p> - {{ .Summary }} - </p> - {{ if .Truncated }} - <a href="{{ .RelPermalink }}">Read More…</a> - {{ end }} - </div> - <hr> - </article> - {{ end }} - {{ end }} + <h2>Posts</h2> + <ul> + {{ range first 100 ( where .Site.RegularPages "Section" "posts" ) }} + <li> + <time>{{ .Date.Format "2006/01/02" }}</time> + <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a> + </li> + {{ end }} + </ul> {{ end }}