diff options
author | edavidaja <enyinnaya.aja@gmail.com> | 2019-06-05 02:15:54 +0300 |
---|---|---|
committer | edavidaja <enyinnaya.aja@gmail.com> | 2019-06-05 02:15:54 +0300 |
commit | 03876a12aa771cb02a4c300ebad3e4d9f33f7edd (patch) | |
tree | 8e02eef526db65f438d865e417a4077ad9246bc3 | |
parent | 1d0b12d9b35d16403b49b79b0a50541906f4a439 (diff) |
added list page templates
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | archetypes/page.md | 4 | ||||
-rw-r--r-- | archetypes/post.md | 3 | ||||
-rw-r--r-- | exampleSite/config.toml | 17 | ||||
-rw-r--r-- | layouts/_default/list.html | 5 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/post/list.html | 16 |
7 files changed, 43 insertions, 10 deletions
@@ -21,8 +21,4 @@ The sidebar will be built automatically from the content in `page`. You can use ### posts -You can create blog posts in post `post`. - -## License - -released under the MIT license
\ No newline at end of file +You can create blog posts in `post`. diff --git a/archetypes/page.md b/archetypes/page.md index d1da513..d8f76cc 100644 --- a/archetypes/page.md +++ b/archetypes/page.md @@ -2,6 +2,6 @@ title= "" subtitle= "" date= "" -draft = false -slug= "" +draft = true +weight = 0 +++ diff --git a/archetypes/post.md b/archetypes/post.md index d1da513..7338d75 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -2,6 +2,5 @@ title= "" subtitle= "" date= "" -draft = false -slug= "" +draft = true +++ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e69de29..b56a4ad 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -0,0 +1,17 @@ +baseURL = "https://example.com" +disablePathToLower = true +languageCode = "en-us" +title = "docter" +theme = "docter" + +[params] + name = "Dr. Hugo" + author="applied research & methods" + author_url="gohugo.io" + repo_host = "Gitlab" + repo = "https://gitlab.com/edavidaja/docter" + logourl="" + logoalt="" + hosted_on="netlify" + hosted_on_url="https://www.netlify.com" +
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index e69de29..4b96a47 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -0,0 +1,5 @@ +{{ define "main" }} + +<h2 class="page-title">{{ .Title }}</h2> + +{{end}}
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index a63f145..5d4e0b6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,7 +6,7 @@ <h2>Posts</h2> <ul class="posts"> {{ $section := where $.Site.RegularPages "Section" "post"}} - {{ range $section }} + {{ range first 5 $section }} <li> <a href="{{ .Page.Permalink }}">{{ .Title }}</a> <span class="post-date">{{ .Date | dateFormat "Jan 2, 2006" }}</span> diff --git a/layouts/post/list.html b/layouts/post/list.html new file mode 100644 index 0000000..7ea5f30 --- /dev/null +++ b/layouts/post/list.html @@ -0,0 +1,16 @@ +{{ define "main" }} + +<div id="home"> + <h2>Posts</h2> + <ul class="posts"> + {{ $section := where $.Site.RegularPages "Section" "post"}} + {{ range $section }} + <li> + <a href="{{ .Page.Permalink }}">{{ .Title }}</a> + <span class="post-date">{{ .Date | dateFormat "Jan 2, 2006" }}</span> + </li> + {{ end }} + </ul> +</div> + +{{end}}
\ No newline at end of file |