diff --git a/exampleSite/content/posts/first_post.md b/exampleSite/content/posts/first_post.md index 7f806cf..e33e573 100644 --- a/exampleSite/content/posts/first_post.md +++ b/exampleSite/content/posts/first_post.md @@ -2,6 +2,7 @@ title: "First Post" date: 2021-05-15T23:39:49+05:30 tags: ["abc", "def"] +type: post --- Yo yo yo diff --git a/exampleSite/content/posts/second_post.md b/exampleSite/content/posts/second_post.md new file mode 100644 index 0000000..a3a5d0b --- /dev/null +++ b/exampleSite/content/posts/second_post.md @@ -0,0 +1,24 @@ +--- +title: "Second Post" +date: 2021-04-15T23:39:49+05:30 +tags: ["xyz", "def"] +type: "post" +--- + +Yo yo yo + +# This is a heading + +- And +- this +- is +- a +- list + +```py +Codeblocks look like this + +def print(): + print('Hello world!') + +``` diff --git a/exampleSite/content/posts/third_post.md b/exampleSite/content/posts/third_post.md new file mode 100644 index 0000000..4e0f2d1 --- /dev/null +++ b/exampleSite/content/posts/third_post.md @@ -0,0 +1,24 @@ +--- +title: "Third Post" +date: 2020-04-15T23:39:49+05:30 +tags: ["xyz"] +type: "post" +--- + +Yo yo yo + +# This is a heading + +- And +- this +- is +- a +- list + +```py +Codeblocks look like this + +def print(): + print('Hello world!') + +``` diff --git a/exampleSite/content/project/tatooine.md b/exampleSite/content/project/tatooine.md new file mode 100644 index 0000000..5fb39bc --- /dev/null +++ b/exampleSite/content/project/tatooine.md @@ -0,0 +1,10 @@ +--- +title: "Tatooine" +date: 2021-05-12T23:39:49+05:30 +tags: ["abc", "def"] +type: singles +--- + +### A long time ago in a galaxy far, far away.... + +A project was planned diff --git a/exampleSite/content/projects.md b/exampleSite/content/projects.md new file mode 100644 index 0000000..0532f5b --- /dev/null +++ b/exampleSite/content/projects.md @@ -0,0 +1,13 @@ +--- +title: "Projects" +tags: ["abc", "def"] +type: singles +--- + + +# Hello my projects are + +1. Tatooine: [Link](/project/tatooine/) +2. is +3. my +4. project diff --git a/themes/gokarna/layouts/_default/list.html b/themes/gokarna/layouts/_default/list.html index 25757a5..d735015 100644 --- a/themes/gokarna/layouts/_default/list.html +++ b/themes/gokarna/layouts/_default/list.html @@ -6,33 +6,28 @@ {{- partial "header.html" . -}}
+
-

All Posts

+

{{ .Name }}

-

2021

-

March

+ {{ $posts := where .Data.Pages "Params.type" "post" }} + {{ range $posts.GroupByDate "2006" }} + +

{{ .Key }}

+ + + {{ range .Pages.GroupByDate "January" }} +

{{ .Key }}

+ {{- range .Pages -}} - - -

2019

-

May

- -

January

- + {{ end }} + {{ end }} + {{ end }}
@@ -40,4 +35,4 @@ {{- partial "footer.html" . -}} - \ No newline at end of file + diff --git a/themes/gokarna/layouts/_default/single.html b/themes/gokarna/layouts/_default/single.html index a8b90e9..1e68a74 100644 --- a/themes/gokarna/layouts/_default/single.html +++ b/themes/gokarna/layouts/_default/single.html @@ -6,27 +6,13 @@ {{- partial "header.html" . -}}
-
+ {{ if eq .Type "post" }} + {{- partial "post.html" . -}} + {{ end }} -
-

{{ .Title }}

- - - -
- -
-

- {{ .Content }} -

-
-
+ {{ if eq .Type "singles" }} + {{- partial "single.html" . -}} + {{ end }}
{{- partial "footer.html" . -}} diff --git a/themes/gokarna/layouts/partials/post.html b/themes/gokarna/layouts/partials/post.html new file mode 100644 index 0000000..af14bd7 --- /dev/null +++ b/themes/gokarna/layouts/partials/post.html @@ -0,0 +1,22 @@ +
+ +
+

{{ .Title }}

+ + + +
+ +
+

+ {{ .Content }} +

+
+
+ diff --git a/themes/gokarna/layouts/partials/single.html b/themes/gokarna/layouts/partials/single.html new file mode 100644 index 0000000..a6dec63 --- /dev/null +++ b/themes/gokarna/layouts/partials/single.html @@ -0,0 +1,13 @@ +
+ +
+

{{ .Title }}

+
+ +
+

+ {{ .Content }} +

+
+
+