diff options
author | Byeonggon Lee <gonny952@gmail.com> | 2018-12-02 23:45:56 +0300 |
---|---|---|
committer | Byeonggon Lee <gonny952@gmail.com> | 2018-12-02 23:45:56 +0300 |
commit | 97e1956428cceb3f3048ec12d63c46145e53985a (patch) | |
tree | e2fbb24cc7b66f00d353c7c73ecf7821b94fa7d8 | |
parent | b34bba6b4d2a40fbd16407e83c1b6e7f244f9dfe (diff) |
Feature: showTitlev1.2.0
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | archetypes/default.md | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 4 |
3 files changed, 9 insertions, 2 deletions
@@ -37,9 +37,10 @@ touch apps/myapp/app.css ### Front Matter - title(string): title for your page +- showTitle(boolean): whether you want to show the title - weight(integer): weight of your page, used for sorting - full(boolean): whether your page is full page or not -- enableDisqus(boolean): wheter your page uses disqus or not, even though this value is true you cannot enable disqus for full page +- enableDisqus(boolean): whether your page uses disqus or not, even though this value is true you cannot enable disqus for full page - img(string): logo image for your page ### What is full page? diff --git a/archetypes/default.md b/archetypes/default.md index 6415b86..997c90c 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,8 @@ +++ title = "no title" -display_title = true +showTitle = true +date = {{ .Date }} +enableDisqus = true full = false img = "" +++ diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 484e731..be4a56f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,9 @@ {{ define "main" }} <div class="apps-content"> + {{- if .Params.showTitle -}} + <h1 style="text-align: center">{{.Params.title}}</h1> + <hr/> + {{- end -}} {{- .Content -}} {{- if not (eq .Site.DisqusShortname "") -}} {{- if isset .Params "enableDisqus" -}} |