FEAT: Using hugo
This commit is contained in:
24
layouts/index.html
Normal file
24
layouts/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html lang="{{- site.Language.Lang -}}">
|
||||
<head>
|
||||
{{- partial "head.html" . -}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
<header class="page__header">{{- partial "header.html" . -}}</header>
|
||||
|
||||
<section class="page__body">{{ .Content }}</section>
|
||||
|
||||
<section class="page__aside">
|
||||
<div class="aside__about">{{- partial "about.html" . -}}</div>
|
||||
<hr />
|
||||
<div class="aside__content">
|
||||
{{- block "aside" . }}{{- end }}{{partial "allTags.html" . -}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="page__footer">{{- partial "footer.html" . -}}</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
10
layouts/partials/allTags.html
Normal file
10
layouts/partials/allTags.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<h2>All Tags</h2>
|
||||
{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }} {{ with
|
||||
$.Site.GetPage (printf "/tags/%s" $name) }}
|
||||
<div class="tagbutton">
|
||||
<a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>"
|
||||
>{{$name}}</a
|
||||
>
|
||||
<span>{{$cnt}}</span>
|
||||
</div>
|
||||
{{end}} {{end}}
|
||||
11
layouts/partials/tags.html
Normal file
11
layouts/partials/tags.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{ $taxonomy := "tags" }} {{ with .Param $taxonomy }}
|
||||
<h2>Tags</h2>
|
||||
<ul>
|
||||
{{ range $index, $tag := . }} {{ with $.Site.GetPage (printf "/%s/%s"
|
||||
$taxonomy $tag) -}}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">{{ $tag | urlize }}</a>
|
||||
</li>
|
||||
{{- end -}} {{- end -}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user