Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

.URL is deprecated, Page .Hugo is deprecated, Data.Pages must be replaced w Site.RegularPages #36

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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