How can I list the pages from the "content/videos/" folder on my home page and category (taxonomy) pages?

Hi,

I have a folder named “videos” inside the /content/ folder

How can I list the pages from the “content/videos/” folder on my home page and category (taxonomy) pages?

The frontmatter of the video pages contain:

---
type: video
---

index.html contains:

{{ range first 16 .Site.RegularPages }}<p><a href="{{ .Permalink }}">{{ .Title }}</a><br>{{ if .Params.date }}<span class="date">{{.Date.Format "02 Jan 2006"}}</span>{{ end }}{{ if .Description }}<br>{{ .Description }}{{ end }}</p><hr>
{{ end -}}

taxonomy.html contains:

{{ range .Pages }}<p><a href="{{ .Permalink }}">{{ .Title }}</a><br>{{ if .Params.date }}<span class="date">{{.Date.Format "02 Jan 2006"}}</span>{{ end }}{{ if .Description }}<br>{{ .Description }}{{ end }}</p><hr>
{{ end -}}

Assuming you are using YAML, Add this code to the front matter of content/video/_index.md

_build:
  list: never

Read more Build options | Hugo

Doesn’t work.

I want the video pages to appear on the home page and category pages together with the articles.

I only want to separate the pages in the /content/ folder.

This reads the opposite from this

So, you aren’t clear on what you want. So, to help you further, see requesting help

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Read this

:point_up_2: :point_up_2:

Anybody?

Please help us to help you.

You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.

See Requesting Help.

I don’t have a public repository. I have everything on my PC and use Netlify CLI to upload from PC to Netlify. I’m using a batch file for Netlify CLI.

I only need to know how to list the pages from the “content/videos/” folder on my home page and category (taxonomy) pages.

I understand what you need. But I have no idea how to meet those needs without access to your templates, etc.

Okay, I understand. Then I will try to find the answer somewhere else. Thanks for your replies.