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

gitlab.com/toryanderson/hugo-icarus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sadowy <email not available>2017-01-20 20:50:33 +0300
committerGreg Sadowy <email not available>2017-01-20 20:50:33 +0300
commit5e3f13e738fa6d9f3244b1fd1a66403f64668170 (patch)
tree7972746413fbf6fffd52e68ec5353d95f8357de1
parented1ac1279164ed601fa6e49e961107ee62f114db (diff)
Added option to omit date line
-rw-r--r--README.md4
-rw-r--r--layouts/partials/article_header.html5
2 files changed, 6 insertions, 3 deletions
diff --git a/README.md b/README.md
index 92bf6d9..898110c 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,9 @@ You can deactivate them under `params.widgets`:
tags = true
tag_cloud = true
+### Date line
+
+The date line includes: post date, # of words, approximate reading, time tags and categories. However, if you want certain pages to omit the date line, simply put `nodateline = true` in the front matter for that page.
## Localization (l10n)
@@ -135,7 +138,6 @@ You can also print formulas inline. In this case wrap the formula only once with
Last but not least I included some useful [shortcodes](http://gohugo.io/extras/shortcodes/) to make your life easier.
-
### Gallery
This way you can include a gallery into your post. Copy the code below into your content file and enter the relative paths to your images.
diff --git a/layouts/partials/article_header.html b/layouts/partials/article_header.html
index e7acf9e..4e57e1c 100644
--- a/layouts/partials/article_header.html
+++ b/layouts/partials/article_header.html
@@ -5,6 +5,8 @@
</h1>
</a>
<div class="article-meta">
+
+ {{ if not .Params.nodateline }}
<div class="article-date">
<i class="fa fa-calendar"></i>
<time datetime="{{ .Date }}" itemprop="datePublished">{{ .Date.Format .Site.Params.date_format }}</time>
@@ -15,8 +17,7 @@
{{ .ReadingTime }}
{{ with .Site.Data.l10n.articles.readingtime }}{{.}}{{end}}
</div>
-
-
+ {{ end }}
{{ if isset .Params "categories" }}
{{ $categoriesLen := len .Params.categories }}
{{ if gt $categoriesLen 0 }}