Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Site.RegularPages instead of Data.Pages,RSSLink deprecated,UniqueID deprecated,Page .Hugo deprecated #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions layouts/_default/list.html
Expand Up @@ -9,12 +9,12 @@
<span class="archive-category">{{ .Title }}</span>
</div>
<div class="archives">
{{ $paginator := .Paginate .Data.Pages }}
{{ $paginator := .Paginate .Site.RegularPages }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
</div>
</section>
{{ partial "pagination" . }}
{{ end }}
{{ end }}
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/article_footer.html
@@ -1,5 +1,5 @@
<footer class="article-footer">
<a data-url="{{ .Permalink }}" data-id="{{ .UniqueID }}" class="article-share-link">
<a data-url="{{ .Permalink }}" data-id="{{ with .File }} {{ .UniqueID }} {{ end }} " class="article-share-link">
<i class="fa fa-share"></i>
{{with .Site.Data.l10n.articles.share}}{{.}}{{end}}
</a>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/article_list.html
@@ -1,4 +1,4 @@
{{ $paginator := .Paginate (where .Data.Pages "Section" "in" .Site.Params.mainSections) }}
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
<article class="article article-type-post" itemscope="" itemprop="blogPost">
<div class="article-inner">
Expand All @@ -24,4 +24,4 @@
</article>
{{ end }}

{{ partial "pagination" . }}
{{ partial "pagination" . }}
4 changes: 2 additions & 2 deletions layouts/partials/head.html
Expand Up @@ -2,7 +2,7 @@
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>
{{ .Hugo.Generator }}
{{ hugo.Generator }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
Expand All @@ -11,7 +11,7 @@
{{ else }}
<meta name="description" content="{{ .Site.Params.site_description }}">
{{ end }}
{{ with .RSSLink }}
{{ with .RelPermalink }}
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ . }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
Expand Down