diff options
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/_default/summary.html | 2 | ||||
-rw-r--r-- | static/css/style.css | 2 |
4 files changed, 9 insertions, 4 deletions
@@ -30,9 +30,14 @@ Next, open `config.toml` in the base of the Hugo site and ensure the theme optio theme = "smol" ``` -Lastly, add the following lines to your `config.toml` to make use of all the menu entries in the header and footer sections if you need them. +Lastly, add the following lines to your `config.toml` to set site parameters and make use of all the menu entries in the header and footer sections if you need them. ``` +# Parameters +[params] + subtitle = "Your blog subtitle goes here!" + dateFmt = "02.01.2006 15:04" + # Header [menu] [[menu.main]] diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1de478c..b334487 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,7 +2,7 @@ <main> <article> <h1>{{ .Title }}</h1> - <b><time>{{ .Date.Format "02.01.2006 15:04" }}</time></b> + <b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b> {{ range .Params.tags }} <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> {{ end }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 05b75a9..a347932 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,6 +1,6 @@ <article> <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1> - <b><time>{{ .Date.Format "02.01.2006 15:04" }}</time></b> + <b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b> {{ range .Params.tags }} <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> {{ end }} diff --git a/static/css/style.css b/static/css/style.css index 5e8047d..dfc6325 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2,5 +2,5 @@ html {overflow-y: scroll} body{max-width:800px;margin:40px auto;padding:0 10px;font:14px/1.5 monospace;color:#444}h1,h2,h3{line-height:1.2}@media (prefers-color-scheme: dark){body{color:white;background:#444}a:link{color:#5bf}a:visited{color:#ccf}} code{color: #FFFFFF; background:#000000; padding:2px} pre{color: #FFFFFF; background:#000000; padding:24px; white-space: pre-wrap} -article{padding:20px 0} +article{padding:24px 0} .center {display: block;margin-left: auto;margin-right: auto;width: 100%;} |