List of content without About page

Hi all,

I’m totally new to Hugo. I adapted the spf13’s hyde theme but want to exclude the about page from being shown on the front-page.

The code for showing the list is as following.

 <div class="posts">
  {{ range .Data.Pages }}
      <div class="post">
        <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
       <span class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
      {{ .Summary }}
      {{ if .Truncated }}
          <div class="read-more-link">
             <a href="{{ .RelPermalink }}">Read More…</a>
         </div>
     {{ end }}
    </div>
{{ end }}
</div>

The content folder:

content
├──posts
   └── post....md
└──about.md

The about page keeps showing on the front-page. How could I exclude it?
Thanks.

I assume you only need to show posts content on your homepage, you can try this {{ range where .Data.Pages "Type" "posts" }}

1 Like

@Yudy_Ananda: Many thanks for your quick reply. It works.

glad to hear that