Updates to support 0.57.2

This commit is contained in:
Josh Johnson 2019-08-17 18:54:03 -04:00
parent 1f72de06f2
commit 2fa06ec88b
No known key found for this signature in database
GPG key ID: 93E0C66B0988E48B
6 changed files with 15 additions and 9 deletions

View file

@ -8,9 +8,9 @@
<ul> <ul>
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<li> <li>
<a href="{{ .URL }}">{{ .Name }}</a> <a href="{{.URL}}">{{ .Name }}</a>
{{ if in ($.Scratch.Get "sections") .Name }} {{ if in ($.Scratch.Get "sections") .Name }}
<a href="{{ .URL }}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a> <a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
{{ end }} {{ end }}
</li> </li>
{{ end }} {{ end }}

View file

@ -1,4 +1,10 @@
{{ $paginator := .Paginate (where .Data.Pages "Type" "!=" "page") }}
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate $pages }}
{{ range .Paginator.Pages }} {{ range .Paginator.Pages }}
{{ $url := replace .Permalink .Site.BaseURL "" }} {{ $url := replace .Permalink .Site.BaseURL "" }}

View file

@ -6,17 +6,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="{{ with .Site.Author.firstname }}{{ . }}{{ end }} {{ with .Site.Author.lastname }}{{ . }}{{ end }}"> <meta name="author" content="{{ with .Site.Author.firstname }}{{ . }}{{ end }} {{ with .Site.Author.lastname }}{{ . }}{{ end }}">
<meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}"> <meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}">
{{ .Hugo.Generator }} {{ hugo.Generator }}
{{ $.Scratch.Add "title" .Site.Title }} {{ $.Scratch.Add "title" .Site.Title }}
<title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.handle }}s {{ .Site.Title }}</title> <title>{{ with .Title }}{{ if ne . ($.Scratch.Get "title") }}{{ . }} &middot; {{ end }}{{ end }}@{{ .Site.Author.handle }}s {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/weblog.css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="{{.Site.BaseURL}}css/weblog.css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.14/css/lightgallery.min.css" type="text/css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.14/css/lightgallery.min.css" type="text/css" />
{{ partial "custom_stylesheets.html" . }} {{ partial "custom_stylesheets.html" . }}
{{ if .Site.Params.rssenabled }} {{ if .Site.Params.rssenabled }}
<link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{.Site.RSSLink}}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }} {{ end }}
</head> </head>
<body class="site"> <body class="site">

View file

@ -1,7 +1,7 @@
<main class="content"> <main class="content">
<article class="post-groups"> <article class="post-groups">
<div class="post-group"> <div class="post-group">
{{ range .Data.Pages.GroupByDate "2006" }} {{ range .Pages.GroupByDate "2006" }}
<div class="post-group-item"> <div class="post-group-item">
<h3>{{ .Key }}</h3> <h3>{{ .Key }}</h3>
<ul> <ul>

View file

@ -8,7 +8,7 @@
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}} {{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" /> <atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
{{ range .Data.Pages }} {{ range .Site.RegularPages }}
{{ if ne .Type "page" }} {{ if ne .Type "page" }}
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>

View file

@ -8,7 +8,7 @@
{{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}} {{ with .Site.Copyright }}<copyright>{{.}}</copyright>{{end}}
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} {{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{.URL}}" rel="self" type="application/rss+xml" /> <atom:link href="{{.URL}}" rel="self" type="application/rss+xml" />
{{ range .Data.Pages }} {{ range .Site.RegularPages }}
{{ if ne .Type "page" }} {{ if ne .Type "page" }}
<item> <item>
{{ if (not (isset .Site.Params "rssmicroposttitles" )) | or (eq .Site.Params.rssmicroposttitles true )}} {{ if (not (isset .Site.Params "rssmicroposttitles" )) | or (eq .Site.Params.rssmicroposttitles true )}}