diff --git a/exampleSite/content/project.md b/exampleSite/content/projects/_index.md similarity index 89% rename from exampleSite/content/project.md rename to exampleSite/content/projects/_index.md index 6bb24e2..a61b7bb 100644 --- a/exampleSite/content/project.md +++ b/exampleSite/content/projects/_index.md @@ -1,7 +1,6 @@ --- title: "Projects" type: singles -slug: /projects --- diff --git a/exampleSite/content/projects/tatooine.md b/exampleSite/content/projects/tatooine.md index e6e79a7..7deb229 100644 --- a/exampleSite/content/projects/tatooine.md +++ b/exampleSite/content/projects/tatooine.md @@ -2,7 +2,6 @@ title: "Tatooine" date: 2021-05-12T23:39:49+05:30 type: singles -slug: tatooine --- ### A long time ago in a galaxy far, far away.... diff --git a/themes/gokarna/layouts/_default/list.html b/themes/gokarna/layouts/_default/list.html index e033694..437033d 100644 --- a/themes/gokarna/layouts/_default/list.html +++ b/themes/gokarna/layouts/_default/list.html @@ -1,16 +1,7 @@ -{{ define "main" }} -
- -

{{ .Name }}

- - {{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }} - -

{{ .Key }}

- - {{- range .Pages -}} - {{- partial "list-posts.html" . -}} +{{ define "main" }} + {{ if eq .Type "singles" }} + {{- partial "single.html" . -}} + {{ else }} + {{- partial "list.html" . -}} {{ end }} - {{ end }} - -
{{ end }} diff --git a/themes/gokarna/layouts/_default/single.html b/themes/gokarna/layouts/_default/single.html index d673775..92886e9 100644 --- a/themes/gokarna/layouts/_default/single.html +++ b/themes/gokarna/layouts/_default/single.html @@ -1,9 +1,9 @@ {{ define "main" }} {{ if eq .Type "post" }} - {{- partial "post.html" . -}} + {{- partial "post.html" . -}} {{ end }} {{ if eq .Type "singles" }} - {{- partial "single.html" . -}} + {{- partial "single.html" . -}} {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/themes/gokarna/layouts/partials/head.html b/themes/gokarna/layouts/partials/head.html index 4bbf196..77c4d8a 100644 --- a/themes/gokarna/layouts/partials/head.html +++ b/themes/gokarna/layouts/partials/head.html @@ -3,7 +3,7 @@ - + + +

{{ .Name }}

+ + {{ range (where .Site.Pages "Params.type" "post" ).GroupByDate "2006" }} + +

{{ .Key }}

+ + {{- range .Pages -}} + {{- partial "list-posts.html" . -}} + {{ end }} + {{ end }} + +