Added breadcrumbs in the Docs section and display tags list in blog posts
This commit is contained in:
parent
f5eb463f91
commit
f0d45fe81f
4 changed files with 28 additions and 1 deletions
|
@ -2,8 +2,12 @@
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
{{ if ne .PublishDate.Year 1 }}{{ .PublishDate.Format "2006-01-02" }} - {{ end }}{{ .Description }}
|
{{ if ne .PublishDate.Year 1 }}{{ .PublishDate.Format "2006-01-02" }} - {{ end }}{{ .Description }}
|
||||||
|
|
||||||
|
{{ if (isset .Params "tags") }}{{ if ge (len .Params.tags) 1 }}<br/>Tag{{ if ge (len .Params.tags) 2 }}s{{ end }}: {{ range .Params.tags }}<a href="/tags/{{ . }}">{{ . }}</a> {{ end }}{{ end }}{{ end }}
|
||||||
|
</p>
|
||||||
|
|
||||||
{{ partial "toc.html" . }}
|
{{ partial "toc.html" . }}
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
|
|
||||||
<h1>{{ .Title }}</h1>
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
|
||||||
{{ with .Content }}
|
{{ with .Content }}
|
||||||
{{ . }}
|
{{ . }}
|
||||||
|
|
10
layouts/docs/single.html
Normal file
10
layouts/docs/single.html
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ partial "breadcrumbs.html" . }}
|
||||||
|
|
||||||
|
{{ partial "toc.html" . }}
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
13
layouts/partials/breadcrumbs.html
Normal file
13
layouts/partials/breadcrumbs.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<p>
|
||||||
|
{{ if ne .Parent nil }}
|
||||||
|
{{ if ne .Parent.Parent nil }}
|
||||||
|
{{ if ne .Parent.Parent.Parent nil }}
|
||||||
|
<a href="{{ .Parent.Parent.Parent.Permalink }}">{{ .Parent.Parent.Parent.Title }}</a> >
|
||||||
|
{{ end }}
|
||||||
|
<a href="{{ .Parent.Parent.Permalink }}">{{ .Parent.Parent.Title }}</a> >
|
||||||
|
{{ end }}
|
||||||
|
<a href="{{ .Parent.Permalink }}">{{ .Parent.Title }}</a> >
|
||||||
|
{{ end }}
|
||||||
|
<strong>{{ .Title }}</strong><br/>
|
||||||
|
{{ .Description }}
|
||||||
|
</p>
|
Loading…
Add table
Reference in a new issue