-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hugo-snippets.html
107 lines (88 loc) · 2.31 KB
/
hugo-snippets.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<nav>
<ul class="Breadcrumbb">
<!-- <li><a href="/{{ .Section }}">◆</a></li> -->
<li>
{{ if .NextInSection }}
<a href="{{ .NextInSection.Permalink }}">
Prev {{ .NextInSection.Title }}
</a></li>
{{ else }}
No prev
{{ end }}
</li>
<li>
{{ if .PrevInSection }}{{ else }}
<!-- No next -->
{{ end }}
</li>
</ul>
</nav>
{{ <!-- *range .Paginator.Pages --> }}
<ul class="List">
{{ range first 200 .Data.Pages }}
{{ if eq .Type "Aspects"}}
{{ .Render "list-item"}}
{{ end }}
{{ end }}
</ul>
<!-- <ul>
<li><a href="{{ .Prev.Permalink }}">Prev {{ .Prev.Title}}</a></li>
<li><a href="{{ .Next.Permalink }}">Next {{ .Next.Title}}</a></li>
</ul>
<ul>
<li><a href="{{ (.Site.Pages.ByWeight.Prev .).Permalink }}">Prev</a></li>
<li><a href="{{ (.Site.Pages.ByWeight.Next .).Permalink }}">Next</a></li>
</ul> -->
<aside>
<!-- {{ if .TableOfContents }}
<h3>Table of contents</h3>
<div class="Toc">
{{ .TableOfContents }}
</div>
{{ end }} -->
<!-- ☞ -->
<!-- ◀ ◆ ▶ -->
<!-- {{ if .NextInSection }}
<a href="{{ .NextInSection.Permalink }}">
<span aria-hidden="true">← Prev</span>
{{ .NextInSection.Title }}
</a>
{{ end }} -->
<!-- <li><a href="{{ .Site.BaseURL }}">All chapters</a></li> -->
<!-- {{ partial "pager.html" . }} -->
<!-- <h3>Continue reading <em>{{ .Section}}</em></h3>
<ul class="List">
{{ $section := .Section }}
{{ range first 200 .Site.Pages }}
{{ if eq .Type $section }}
{{ .Render "list-item"}}
{{ end }}
{{ end }}
</ul>
{{ if .Params.tags }}
<h3>Tags</h3>
{{ $baseurl := .Site.BaseURL }}
<ul class="List List--tags">
{{ range .Params.tags }}
<li>
<a href="{{ $baseurl }}/tags/{{ . | urlize }}">
{{ . }}
</a>
</li>
{{ end }}
</ul>
{{ end }} -->
<!-- <h3>Related Post</h3>
<ul class="List">
{{ $page_link := .Permalink }}
{{ $tags := .Params.tags }}
{{ range .Site.Pages }}
{{ $page := . }}
{{ $has_common_tags := intersect $tags .Params.tags | len | lt 0 }}
{{ if and $has_common_tags (ne $page_link $page.Permalink) }}
<li><a href="{{ $page.Permalink }}">{{ $page.Title }}</a></li>
{{ end }}
{{ end }}
</ul> -->
</aside>
gsed -i.backup -e 's/^# \(.*\)$/---\ntitle: \"\1\"\n---/g' *.md