Assistance Understanding Singular/Plural Content Types

Hello All,

I am using a theme with singular archetypes. So hugo new page/ seems to catch but hugo new pages/ does not.

Accordingly, /page returns the list of pages, however, I would prefer /pages to do the same.

I read this page and this page, but do not see any obvious solution to my desired result, so posting here. :slight_smile: Is there a way to simply render all my Page type under /pages rather than /page?

Thank you for any assistance you can provide. :+1:

Hi there,

Have a read of the docs here:

Basically, Hugo will render your site based on the structure of your content. So if you have content/lorem/ you will get, (unless overridden by defining alternative urls or aliases etc).

So if you have content/pages/ and content/page/ you will get and

This means that if you rename content/page/ to content/pages/ it will now render at

As for the archetypes:

you can create your own, reflecting the section name it is to be applicable to, ie archetypes/

1 Like

Great thank you for your help, @pointyfar! It would seem my concern is confirmed, then… I have to either stick with /page or duplicate every single archetype file in the theme as my own and pluralize them if I want to use /pages. Please let me know if I have misunderstood something.

Alternatively, you can configure what permalink format to use or set the url manually in the frontmatter. Have a read here:

Ah, I do have permalink already configured:

  article: /:year/:month/:title/
  page: /:title

However, that does not seem to place content in the /pages/ location as desired. I am also aware of setting the URL manually in the front matter but I am searching for a less cumbersome approach for my desired result. I appreciate any further assistance you or others might provide.

page: /pages/:title/

Ah unfortunately that does not generate the list of pages in /pages… the list still remains on /page. Additionally, I would prefer the links for individual pages to be at the root, as there are not very many of them (and consider them the default content).

I’m confused now.

but you also want them under /pages/?

Add content/page/ set url in the frontmatter to url: "post" .

Woohoo! Thank you. That did the trick. For completeness, I created an /content/page/ with the following content:

url: pages

Thank you, @pointyfar!

Sorry got so excited by the solution I didn’t reply to this. :grin: For single pages I want them to render under the root – this is done via permalink. For the list of all pages in the site I want them to render under /pages/ – this is now done via