diff --git a/README.md b/README.md index c1f0541..1b66ff3 100644 --- a/README.md +++ b/README.md @@ -44,5 +44,5 @@ custom_css = [] - [x] Set up homepage template - [x] Post summry template - [ ] Complete readme -- [ ] Add list page template to post section -- [ ] Add taxonomy templates +- [x] Add list page template to post section +- [x] Add taxonomy templates diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 3fa88cc..4984ece 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -6,21 +6,21 @@ {{ $baseUrl := .Site.BaseURL }} - {{ if isset .Params "topics" }} - {{ $count := len .Params.topics }} - {{ if gt $count 0 }} + {{ if isset .Params "categories" }} + {{ $count := len .Params.categories }} + {{ if gt $count 0 }}
- {{ range $k, $v := .Params.topics }} - {{ . }}{{ if lt $k (sub $count 1) }} /{{ end }} + {{ range $k, $v := .Params.categories }} + {{ . }}{{ if lt $k (sub $count 1) }} /{{ end }} {{ end }}
{{ end }} {{ end }} {{ if isset .Params "tags" }} - {{ $count := len .Params.tags }} - {{ if gt $count 0 }} + {{ $count := len .Params.tags }} + {{ if gt $count 0 }}
{{ range $k, $v := .Params.tags }} diff --git a/layouts/partials/prev-next-post.html b/layouts/partials/prev-next-post.html new file mode 100644 index 0000000..fbff68f --- /dev/null +++ b/layouts/partials/prev-next-post.html @@ -0,0 +1,14 @@ +{{ if or (.PrevInSection) (.NextInSection) }} +
+
+ {{ if .PrevInSection }} + {{ .PrevInSection.Title }} + {{ end }} +
+
+ {{ if .NextInSection }} + {{ .NextInSection.Title }} + {{ end }} +
+
+{{ end }} diff --git a/layouts/post/list.html b/layouts/post/list.html new file mode 100644 index 0000000..1d747e9 --- /dev/null +++ b/layouts/post/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Site.Params.subtitle }}

+
+
+ {{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }} + {{ range $paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..eed4c2b --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,17 @@ +{{ define "main" }} +
+

{{ .Title }}

+

{{ .Description }}

+
+
+ + {{ partial "post-meta.html" . }} + + {{ .Content }} + + {{ partial "prev-next-post.html" . }} + + {{ partial "disqus.html" . }} + +
+{{ end }} diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html new file mode 100644 index 0000000..ff86c22 --- /dev/null +++ b/layouts/taxonomy/list.html @@ -0,0 +1,13 @@ +{{ define "main" }} +
+

{{ .Title }}

+
+
+ {{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }} + {{ range $paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + + {{ partial "pagination.html" . }} +
+{{ end }} diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html new file mode 100644 index 0000000..ecfd667 --- /dev/null +++ b/layouts/taxonomy/terms.html @@ -0,0 +1,16 @@ +{{ define "main" }} +
+

{{ .Title }}

+
+
+ +
+{{ end }}