From 97e1956428cceb3f3048ec12d63c46145e53985a Mon Sep 17 00:00:00 2001 From: Byeonggon Lee Date: Mon, 3 Dec 2018 05:45:56 +0900 Subject: Feature: showTitle --- README.md | 3 ++- archetypes/default.md | 4 +++- layouts/_default/single.html | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4263a73..8b664e5 100644 --- a/README.md +++ b/README.md @@ -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" }}
+ {{- if .Params.showTitle -}} +

{{.Params.title}}

+
+ {{- end -}} {{- .Content -}} {{- if not (eq .Site.DisqusShortname "") -}} {{- if isset .Params "enableDisqus" -}} -- cgit v1.2.3