Merge 150b926feeeebfcdb3313a01070e43ac24e0698c into 60984fd13658db175e8945467d3dd799f2fdcc32
This commit is contained in:
commit
7291fe3963
@ -3,10 +3,6 @@
|
|||||||
margin: 24px auto var(--content-gap) auto;
|
margin: 24px auto var(--content-gap) auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-title {
|
|
||||||
margin-bottom: 2px;
|
|
||||||
font-size: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-description {
|
.post-description {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
3
layouts/_default/_markup/render-link.html
Normal file
3
layouts/_default/_markup/render-link.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<!-- Source: https://roneo.org/en/hugo-open-external-links-in-a-new-tab/ -->
|
||||||
|
|
||||||
|
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="nofollow noopener noreferrer" {{ end }}>{{ .Text | safeHTML }}</a>
|
@ -27,7 +27,7 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- $pages := where ( where site.RegularPages "Type" "in" site.Params.mainSections ) ".Params.offTheRecord" "!=" true }}
|
||||||
|
|
||||||
{{- if site.Params.ShowAllPagesInArchive }}
|
{{- if site.Params.ShowAllPagesInArchive }}
|
||||||
{{- $pages = site.RegularPages }}
|
{{- $pages = site.RegularPages }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- $.Scratch.Add "index" slice -}}
|
{{- $.Scratch.Add "index" slice -}}
|
||||||
{{- range site.RegularPages -}}
|
{{- range site.RegularPages -}}
|
||||||
{{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
|
{{- if and (not .Params.searchHidden) (ne .Params.offTheRecord true) (ne .Layout `archives`) (ne .Layout `search`) }}
|
||||||
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
{{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||||
|
{{- $pages = where $pages "Params.offTheRecord" "!=" "true" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- $paginator := .Paginate $pages }}
|
{{- $paginator := .Paginate $pages }}
|
||||||
@ -97,20 +98,10 @@
|
|||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
<nav class="pagination">
|
<nav class="pagination">
|
||||||
{{- if $paginator.HasPrev }}
|
{{- if $paginator.HasPrev }}
|
||||||
<a class="prev" href="{{ $paginator.Prev.URL | absURL }}">
|
<a class="prev" href="{{ $paginator.Prev.URL | absURL }}">« {{ i18n "prev_page" }}</a>
|
||||||
« {{ i18n "prev_page" }}
|
|
||||||
{{- if (.Param "ShowPageNums") }}
|
|
||||||
{{- sub $paginator.PageNumber 1 }}/{{ $paginator.TotalPages }}
|
|
||||||
{{- end }}
|
|
||||||
</a>
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if $paginator.HasNext }}
|
{{- if $paginator.HasNext }}
|
||||||
<a class="next" href="{{ $paginator.Next.URL | absURL }}">
|
<a class="next" href="{{ $paginator.Next.URL | absURL }}">{{ i18n "next_page" }} »</a>
|
||||||
{{- i18n "next_page" }}
|
|
||||||
{{- if (.Param "ShowPageNums") }}
|
|
||||||
{{- add 1 $paginator.PageNumber }}/{{ $paginator.TotalPages }}
|
|
||||||
{{- end }} »
|
|
||||||
</a>
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</nav>
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ range $pages }}
|
{{ range $pages }}
|
||||||
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
|
{{- if and (ne .Layout `search`) (ne .Params.offTheRecord true) (ne .Layout `archives`) }}
|
||||||
<item>
|
<item>
|
||||||
<title>{{ .Title }}</title>
|
<title>{{ .Title }}</title>
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
|
24
layouts/_default/sitemap.xml
Normal file
24
layouts/_default/sitemap.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
|
{{ range .Data.Pages }}
|
||||||
|
{{- if and .Permalink (ne .Params.offTheRecord true) -}}
|
||||||
|
<url>
|
||||||
|
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||||
|
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||||
|
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||||
|
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||||
|
<xhtml:link
|
||||||
|
rel="alternate"
|
||||||
|
hreflang="{{ .Language.Lang }}"
|
||||||
|
href="{{ .Permalink }}"
|
||||||
|
/>{{ end }}
|
||||||
|
<xhtml:link
|
||||||
|
rel="alternate"
|
||||||
|
hreflang="{{ .Language.Lang }}"
|
||||||
|
href="{{ .Permalink }}"
|
||||||
|
/>{{ end }}
|
||||||
|
</url>
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
</urlset>
|
@ -1,7 +1,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }}
|
{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.offTheRecord true) (ne .Params.robotsNoIndex true) }}
|
||||||
<meta name="robots" content="index, follow">
|
<meta name="robots" content="index, follow">
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user