My current page display is like this. The 0001-01 is because my about page has no time configured.
As a new user, I can only submit one image , about.md is like this.
---
title: "About"
date: ""
tags: []
categories: []
author: ""
---
If I add time to about page, this style can be solved, but I don’t want to add time, so what should I do? I search the usage of some functions and didn’t get the answer.
The following is part of the configuration file.
/layouts/_default/list.html
{{ partial "header.html" . }}
{{ range (where (.Pages.GroupByDate "2006-01") "Section" "!=" "") }}
<h2 class="archive-title">{{ .Key }}</h2>
{{ end }}
{{ $.Scratch.Set "pages" .Site.RegularPages }}
<ul>
{{ range (where ($.Scratch.Get "pages") "Section" "!=" "") }}
<li>
<span class="date">{{ .Date.Format "2006/01/02" }}</span>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
{{ partial "footer.html" . }}
config.yaml
menu:
main:
- name: "Home"
url: "/"
weight: 1
- name: "Categories"
url: "/categories/"
weight: 2
- name: "Tags"
url: "/tags/"
weight: 3
- name: "About"
url: "/about/"
weight: 4
I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.