Skip to content

Commit

Permalink
.URL is deprecated, Page .Hugo is deprecated, Data.Pages must be repl…
Browse files Browse the repository at this point in the history
…aced w Site.RegularPages
  • Loading branch information
nonumeros committed Dec 30, 2019
1 parent b747d89 commit b4aad19
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
{{ partial "meta-twitter" . }}
{{ partial "meta-facebook" . }}

{{ .Hugo.Generator }}
{{ hugo.Generator }}

{{ "<!-- Stylesheets -->" | safeHTML }}
<link rel="stylesheet" type="text/css" href="{{ "built/screen.css" | absURL}}" />
<link rel="stylesheet" type="text/css" href="{{ "css/casper-two.css" | absURL}}" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" />
{{ range .Site.Params.customCSS }} <link rel="stylesheet" href="{{ . | absURL }}" /> {{ end }}

{{ if .Site.Params.RSSLink}}<link href="{{.Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{else}}{{ if eq .URL "/" }}<link href="{{ "index.xml" | absURL}}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{ end }} {{ end }}
{{ if .Site.Params.RSSLink}}<link href="{{.Site.Params.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> {{else}}{{ if eq .Permalink "/" }}{{ .Name }} {{ end }} {{ end }}

</head>
4 changes: 2 additions & 2 deletions layouts/partials/header-sori-tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
</nav>

<div class="site-header-content">
<h1 class="site-title">{{.Title}}</h1>{{$.Scratch.Set "total" (len .Data.Pages)}}
<h1 class="site-title">{{.Title}}</h1>{{$.Scratch.Set "total" (len .Site.RegularPages )}}
<h2 class="site-description">
{{if ge ($.Scratch.Get "total") 2 }}A collection of {{$.Scratch.Get "total"}} posts
{{else}}{{$.Scratch.Get "total"}} post{{end}}
</h2>
</div>
</div>
</header>
</header>
2 changes: 1 addition & 1 deletion layouts/partials/header-sori-term.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ <h2 class="site-description">&#x2F;&nbsp;
</h2>
</div>
</div>
</header>
</header>
2 changes: 1 addition & 1 deletion layouts/partials/header-sori.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@
</nav>

</div>
</header>
</header>
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ <h2 class="site-description">{{ .Site.Params.subtitle }} </h2>
</nav>

</div>
</header>
</header>
4 changes: 2 additions & 2 deletions layouts/partials/meta-facebook.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:title" content="{{ if ne .URL "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Params.Title }}" />
<meta property="og:title" content="{{ if ne .Permalink "/" }}{{ .Title }} &middot; {{ end }}{{ .Site.Params.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{if .Site.Params.fbName}}<meta property="article:publisher" content="https://www.facebook.com/{{.Site.Params.fbName}}" />{{end}}
{{ if .IsPage }}
Expand All @@ -14,4 +14,4 @@
{{ end }}{{if .Params.image }}
<meta property="og:image" content="{{ .Params.image | absURL}}"/>
{{else}}{{if .Site.Params.cover}}
<meta property="og:image" content="{{ .Site.Params.cover | absURL}}"/>{{end}}{{end}}
<meta property="og:image" content="{{ .Site.Params.cover | absURL}}"/>{{end}}{{end}}
2 changes: 1 addition & 1 deletion layouts/partials/meta-twitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
{{ end }} <!-- Twitter Card data -->
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{if .IsPage}}{{ .Description | default (substr .Summary 0 160) }}{{ else }}{{ .Site.Params.description }}{{ end }}"/>
<meta name="twitter:url" content="{{.URL | absURL}}" />
<meta name="twitter:url" content="{{.Permalink | absURL}}" />
<meta name="twitter:site" content="@{{ .Site.Params.twitterName }}"/>
2 changes: 1 addition & 1 deletion layouts/partials/post-list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $paginator := .Paginate (where .Data.Pages.ByDate.Reverse "Type" "post") }}
{{ $paginator := .Paginate (where .Site.RegularPages.ByDate.Reverse "Type" "post") }}
{{ range $paginator.Pages }}

<article class="post-card post">
Expand Down

0 comments on commit b4aad19

Please sign in to comment.