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

github.com/hauke96/hugo-theme-hamburg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeichi Takahashi <keichi.t@me.com>2017-11-26 08:30:53 +0300
committerGitHub <noreply@github.com>2017-11-26 08:30:53 +0300
commitf050f5829f4f839494f4e71e1ceec20090bd97de (patch)
tree3ad4de69819ce0d3f1d99df08484eb19b3fb3475
parent0fb20ea3f6df18a463e515d3f631bdd4e60e948e (diff)
parent0c617168d82a1883f1e274cec5b5ee631957042e (diff)
Merge pull request #28 from jolexa/no-date
Add a feature to not show the date on posts/pages
-rw-r--r--README.md7
-rw-r--r--layouts/_default/single.html3
2 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 564102a..e9b8950 100644
--- a/README.md
+++ b/README.md
@@ -66,6 +66,13 @@ copyright = "&copy; Copyright notice"
themecolor = "#hexcolor" # Defines the tab color in Chrome for Android.
```
+You may specify following options in `front matter` of your posts to make use of
+this theme's features.
+
+```toml
+noshowdate = true # This will ensure that the date is not printed
+```
+
## Usage
Use hugo's `-t vienna` or `--theme=vienna` option with hugo commands.
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 67f023c..bf5edd9 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,12 +4,15 @@
<header>
<h1 class="text-primary">{{ .Title }}</h1>
<div class="post-meta clearfix">
+ {{ if (isset .Params "noshowdate") }}
+ {{ else }}
<div class="post-date pull-left">
Posted on
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Date.Format "Jan 2, 2006" }}
</time>
</div>
+ {{ end }}
<div class="pull-right">
{{ range .Params.tags }}
<span class="post-tag small"><a href="{{ $baseurl }}/tags/{{ . | urlize }}">#{{ . }}</a></span>