diff options
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | layouts/_default/single.html | 3 |
2 files changed, 10 insertions, 0 deletions
@@ -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> |