Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/edavidaja/docter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoredavidaja <enyinnaya.aja@gmail.com>2019-05-29 17:45:53 +0300
committeredavidaja <enyinnaya.aja@gmail.com>2019-05-29 17:45:53 +0300
commit12c0d8d856b3ed925e05d96b76123c84b7c6059c (patch)
tree7e42b045f3b0870c7c86f6ecb35593a4921de411
parent8b5c6bcae56765017c1cf3b8169bf4bbf9277279 (diff)
updates to footer and landing page
added blogpost archetype updated layout for single blogpost home page content now renders appropriately added edit links for host to footer
-rw-r--r--archetypes/blogpost.md5
-rw-r--r--layouts/blogpost/single.html4
-rw-r--r--layouts/index.html18
-rw-r--r--layouts/partials/footer.html25
4 files changed, 46 insertions, 6 deletions
diff --git a/archetypes/blogpost.md b/archetypes/blogpost.md
index ac36e06..d1da513 100644
--- a/archetypes/blogpost.md
+++ b/archetypes/blogpost.md
@@ -1,2 +1,7 @@
+++
+title= ""
+subtitle= ""
+date= ""
+draft = false
+slug= ""
+++
diff --git a/layouts/blogpost/single.html b/layouts/blogpost/single.html
index 5dcafc5..a07dc2a 100644
--- a/layouts/blogpost/single.html
+++ b/layouts/blogpost/single.html
@@ -1,10 +1,10 @@
{{ define "main" }}
<article>
<h2 class="page-title">{{ .Title }}</h2>
- <p class="meta">{{ dateFormat "Sep 21, 1988" .Date }}</p>
+ <p class="meta">{{ .Date | dateFormat "Jan 2, 2006" }}</p>
<div class="post">
{{ .Content }}
</div>
</article>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index e69de29..5fc05d2 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -0,0 +1,18 @@
+{{define "main" }}
+
+{{ .Content }}
+
+<div id="home">
+ <h2>Posts</h2>
+ <ul class="posts">
+ {{ $section := where $.Site.RegularPages "Section" "blogpost"}}
+ {{ 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
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 8bcb421..884c557 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,7 +1,24 @@
<footer role="contentinfo">
<div class="wrap">
- <p>This project is maintained by <a href="{{ .Site.Params.author_url}}">{{ .Site.Params.author }}</a>.</p>
+ <p>
+ This project is maintained by
+ <a href="{{ .Site.Params.author_url}}">{{ .Site.Params.author }}</a
+ >.
+ </p>
- <p>Hosted on <a href="{{ .Site.Params.hosted_on_url }}">{{.Site.Params.hosted_on}}</a>.</p>
- </div><!--/.wrap -->
-</footer> \ No newline at end of file
+ <p>
+ Hosted on
+ <a href="{{ .Site.Params.hosted_on_url }}">{{.Site.Params.hosted_on}}</a
+ >.
+ </p>
+
+ <p>
+ <a href="{{ .Site.Params.repo }}/edit/master/content/{{.File.Path}}"
+ >Edit this page</a
+ >
+ or <a href="{{.Site.Params.repo}}/issues">file an issue</a> on
+ {{.Site.Params.repo_host}}.
+ </p>
+ </div>
+ <!--/.wrap -->
+</footer>