mirror of
https://github.com/skoelle/buildbroken-blog-archive.git
synced 2026-09-17 18:30:25 +00:00
many fixes
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
{{- $desc := "" }}
|
||||
{{- if .IsHome }}
|
||||
{{- $desc = .Site.Params.description }}
|
||||
{{- else if .Description }}
|
||||
{{- $desc = .Description }}
|
||||
{{- else if .Content }}
|
||||
{{- $desc = .Content | plainify }}
|
||||
{{- else if .IsNode }}
|
||||
@@ -57,8 +59,11 @@
|
||||
{{- if not $desc }}{{ $desc = .Summary | plainify }}{{ end }}
|
||||
{{- $desc = strings.TrimSpace (strings.TrimRight "…" $desc) | truncate 160 }}
|
||||
{{- if $desc }}<meta name="description" content="{{ $desc }}">{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<meta property="og:type" content="{{ if .IsHome }}website{{ else }}article{{ end }}">
|
||||
{{- if eq .Kind "404" }}<meta name="robots" content="noindex">{{ end }}
|
||||
{{- if ne .Kind "404" }}<link rel="canonical" href="{{ .Permalink }}">{{ end }}
|
||||
{{- $ogType := "website" }}
|
||||
{{- if .IsPage }}{{ $ogType = "article" }}{{ end }}
|
||||
<meta property="og:type" content="{{ $ogType }}">
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:title" content="{{ $title }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
@@ -66,7 +71,7 @@
|
||||
{{- if .Params.images }}
|
||||
{{- range .Params.images }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
|
||||
{{- else }}<meta property="og:image" content="{{ .Site.Params.bannerImage | absURL }}">{{ end }}
|
||||
{{- if not .IsHome }}{{ with .Date }}<meta property="article:published_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ end }}{{ end }}
|
||||
{{- if .IsPage }}{{ with .Date }}<meta property="article:published_time" content="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ end }}{{ end }}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ $title }}">
|
||||
{{- if $desc }}<meta name="twitter:description" content="{{ $desc }}">{{ end }}
|
||||
@@ -109,7 +114,7 @@
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<script type="application/json" id="link-status-data">{{ (dict "broken" (site.Data.links.broken | default dict) "replacement" (site.Data.links.replacement | default dict)) | jsonify | safeJS }}</script>
|
||||
<script type="application/json" id="link-status-data">{{ (dict "broken" (hugo.Data.links.broken | default dict) "replacement" (hugo.Data.links.replacement | default dict)) | jsonify | safeJS }}</script>
|
||||
<script src="{{ "js/link-status.js" | relURL }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- $pages := where .Site.RegularPages "Section" "!=" "" }}
|
||||
{{- $pages = where $pages "File.ContentBase" "!=" "impressum" }}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $pages = $pages | first $limit }}
|
||||
{{- end }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link>{{ .Site.BaseURL }}</link>
|
||||
<description>{{ with .Site.Params.description }}{{ . }}{{ end }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{- with .Language.Locale }}<language>{{ . }}</language>{{ end }}
|
||||
{{- range $pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
{{- with .Params.author }}<author>{{ . }}</author>{{ end }}
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user