How to hide root dir when get key for title in home page

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 :joy: , 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.


{{ partial "header.html" . }}

{{ range (where (.Pages.GroupByDate "2006-01") "Section" "!=" "") }}
<h2 class="archive-title">{{ .Key }}</h2>
{{ end }}

{{ $.Scratch.Set "pages" .Site.RegularPages }}
  {{ range (where ($.Scratch.Get "pages") "Section" "!=" "") }}
    <span class="date">{{ .Date.Format "2006/01/02" }}</span>
    <a href="{{ .RelPermalink }}">{{ .Title }}</a>
  {{ end }}

{{ partial "footer.html" . }}


    - 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.

It is not clear what your question is. Please read Requesting Help and follow the advice. If you share a link to a repo of your code and take time to explain what you are trying to accomplish, someone can probably help ya. :slight_smile:

Thank you for your reply. I will learn more about grammar and try to solve this problem by myself. Now let me focus on the content first.