Merge branch 'master' into delayed-disqus
This commit is contained in:
commit
934131263b
25 changed files with 726 additions and 19 deletions
|
|
@ -21,6 +21,18 @@
|
|||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.showRelatedPosts }}
|
||||
{{ $related := .Site.RegularPages.Related . | first 3 }}
|
||||
{{ with $related }}
|
||||
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
|
||||
{{ if ne .Type "page" }}
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@
|
|||
<ul class="pager main-pager">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li class="previous">
|
||||
<a href="{{ .Paginator.Prev.URL | absURL }}">← {{ i18n "newerPosts" }}</a>
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}/">← {{ i18n "newerPosts" }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li class="next">
|
||||
<a href="{{ .Paginator.Next.URL | absURL }}">{{ i18n "olderPosts" }} →</a>
|
||||
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} →</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,38 @@
|
|||
{{- if eq .Kind "taxonomyTerm" }}
|
||||
{{- range $key, $value := .Data.Terms.ByCount }}
|
||||
{{- $.Scratch.Add "most_used" (slice $value.Name) }}
|
||||
{{- end }}
|
||||
{{- if not ($.Scratch.Get "most_used") }}
|
||||
{{- $description := printf "A full overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular | truncate 180 }}
|
||||
{{- $.Scratch.Set "Description" $description }}
|
||||
{{- else }}
|
||||
{{- $description := printf "A full overview of all pages with %s, ordered by %s, such as: %s" .Data.Plural .Data.Singular ( delimit ( $.Scratch.Get "most_used" ) ", " ", and " ) | truncate 180 }}
|
||||
{{- $.Scratch.Set "Description" $description }}
|
||||
{{- end }}
|
||||
|
||||
{{- $title := printf "Overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular }}
|
||||
{{- $.Scratch.Set "Title" $title }}
|
||||
{{- else if eq .Kind "taxonomy" }}
|
||||
{{- $description := printf "Overview of all pages with the %s #%s, such as: %s" .Data.Singular $.Title ( index .Pages 0).Title | truncate 160 }}
|
||||
{{- $.Scratch.Set "Description" $description }}
|
||||
|
||||
{{- $title := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }}
|
||||
{{- $.Scratch.Set "Title" $title }}
|
||||
{{- else }}
|
||||
{{- $.Scratch.Set "Description" ( .Description | default .Params.subtitle | default .Summary ) }}
|
||||
{{- $.Scratch.Set "Title" ( .Title | default .Site.Title ) }}
|
||||
{{- end }}
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<!-- Site Title, Description, Author, and Favicon -->
|
||||
{{- with .Title | default .Site.Title }}
|
||||
<title>{{ . }}</title>
|
||||
{{- with ($.Scratch.Get "Title") }}
|
||||
<title>{{ . }} - {{ $.Site.Title }}</title>
|
||||
<meta property="og:title" content="{{ . }}" />
|
||||
<meta name="twitter:title" content="{{ . | truncate 70 }}" />
|
||||
{{- end }}
|
||||
{{- with .Description | default .Params.subtitle | default .Summary }}
|
||||
{{- with ($.Scratch.Get "Description") }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
<meta property="og:description" content="{{ . }}">
|
||||
<meta name="twitter:description" content="{{ . | truncate 200 }}">
|
||||
|
|
|
|||
7
layouts/shortcodes/mermaid.html
Normal file
7
layouts/shortcodes/mermaid.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<link href="{{"css/mermaid.css" | relURL}}" type="text/css" rel="stylesheet"/>
|
||||
<script defer src="{{"js/mermaid.js" | relURL}}">
|
||||
mermaid.initialize({startOnLoad:true});
|
||||
</script>
|
||||
<div class="mermaid" align="{{ if .Get "align" }}{{ .Get "align" }}{{ else }}center{{ end }}" >
|
||||
{{ safeHTML .Inner }}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue