diff options
author | d-asnaghi <asnaghi@me.com> | 2020-05-17 21:43:45 +0300 |
---|---|---|
committer | d-asnaghi <asnaghi@me.com> | 2020-05-17 21:43:45 +0300 |
commit | 66cc1bc0072a9f66c8f118231fb56fb1f8c6ee16 (patch) | |
tree | 49b960ded4f0379d3496e5b81c28bd73de01a7a4 | |
parent | b2825f3fa8393896322fbad9528c622515528be5 (diff) |
[HUGO] addressed pages without title
-rw-r--r-- | layouts/_default/list.html | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index d4ba228..86b9e3a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -23,10 +23,12 @@ <nav> <ul> {{ range .Pages.ByDate }} - {{if .Content}} - <li><a href="#{{ .Title | urlize }}">{{ .Title }}</a></li> - {{ else }} - <li><a href="{{ .Permalink }}">{{ .Title }}</a></li> + {{if .Title }} + {{if .Content}} + <li><a href="#{{ .Title | urlize }}">{{ .Title }}</a></li> + {{ else }} + <li><a href="{{ .Permalink }}">{{ .Title }}</a></li> + {{ end }} {{ end }} {{ end }} </ul> @@ -37,13 +39,13 @@ <div id="main"> {{ range .Pages }} - {{if .Content }} - {{if .Title }} - <article id="{{ .Title | urlize }}"> - <h2 class="major">{{ .Title }}</h2> - <span class="image main"><img src="{{ .Params.image }}" alt="" /></span> - {{ .Content }} - </article> + {{if .Title }} + {{if .Content }} + <article id="{{ .Title | urlize }}"> + <h2 class="major">{{ .Title }}</h2> + <span class="image main"><img src="{{ .Params.image }}" alt="" /></span> + {{ .Content }} + </article> {{ end }} {{ end }} {{ end }} |