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:
-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 = "© 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>