Commit c11fc5d6 authored by Yurizal Susanto's avatar Yurizal Susanto

Add default value to undefined .Site.Params

parent b190f41e
......@@ -4,8 +4,8 @@
<body>
<main class="container">
<hgroup id="brand" class="u-header">
<h1>{{ .Site.Params.Head404 | safeHTML }}</h1>
<h5>{{ .Site.Params.Sub404 | safeHTML }}</h5>
<h1>{{ .Site.Params.Head404 | default "Sorry, I can't find what you want." | safeHTML }}</h1>
<h5>{{ .Site.Params.Sub404 | default "Back to <a href='/'>Home</a>." | safeHTML }}</h5>
</hgroup>
<hr class="sep"/>
</main>
......
......@@ -4,7 +4,7 @@
<div class="u-footer">
{{ partial "social.html" . }}
<p>
{{ if .Site.Params.themeAttrib }}
{{ if .Site.Params.themeAttrib | default true }}
{{ T "usedTheme" }} <a href="https://github.com/yursan9/manis-hugo-theme">Manis</a><br>
{{ end }}
{{ with .Site.Copyright }}
......
<li>
<span><time datetime="{{.Date}}">{{ .Date.Format .Site.Params.DateFmt }}</time></span>
{{ $dateformat := .Site.Params.DateFmt | default "Jan 02, 2006" }}
<span><time datetime="{{.Date}}">{{ .Date.Format $dateformat }}</time></span>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
......@@ -10,7 +10,8 @@
{{- else if eq .Kind "page" -}}
<h1>{{ .Title }}</h1>
<h5>
<time datetime="{{.Date}}">{{ .Date.Format .Site.Params.DateFmt }}</time>
{{ $dateformat := .Site.Params.DateFmt | default "Jan 02, 2006" }}
<time datetime="{{.Date}}">{{ .Date.Format $dateformat }}</time>
<span class="no-print">
{{ with .Params.tags -}}
-
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment