Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/your-identity/hugo-theme-dimension.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authord-asnaghi <asnaghi@me.com>2020-05-17 21:43:45 +0300
committerd-asnaghi <asnaghi@me.com>2020-05-17 21:43:45 +0300
commit66cc1bc0072a9f66c8f118231fb56fb1f8c6ee16 (patch)
tree49b960ded4f0379d3496e5b81c28bd73de01a7a4
parentb2825f3fa8393896322fbad9528c622515528be5 (diff)
[HUGO] addressed pages without title
-rw-r--r--layouts/_default/list.html24
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 }}