Replicating the Blog Posts summary for similar Help section

Hello Team,

Apologies in advance; starting to replace my manually built static sites with Hugo so still on a learning curve.

The Blog feature allows me to create a list of posts that are shown in preview with banners & abstract (with tags & categories) from Thereby I don’t have to constantly add links pointing to new blog posts. Hugo does this automatically. :heart:

I would like to replicate this feature for a set of Help pages in addition to the Blog pages. How can I replicate the Blog functionality to a set of Help pages? For example with config.toml set for blog = "/blog/:year/:month/:filename/"




I would not want the Help pages showing a creation year/month like Blog. How would I configure the HELP section to adopt help = /help/:filename/

Any pointers greatly appreciated!

The thing you are looking for is called permalinks.

So presuming you are adding them to config.toml:

  blog = "/blog/:year/:month/:filename/"
  help = "/help/:filename/"

Maybe you are missing the quotes, or have that somewhere else in your config. Make sure it looks like the example.

1 Like

Thanks for the links to the right part of the docs.

I’ve added the help permalinks to config.toml:

	blog = "/blog/:year/:month/:filename/"
	help = "/help/:filename/"

I’ve added Help into the top menu in config.toml:

    name = "Help"
    url  = "/help/"
    weight = 3

I’ve regenerated my help page content:

hugo new help/
hugo new help/
hugo new help/

Running the local server hugo server -D --verbose shows my new “Help” link but browsing to /help/ displays the theme, with page titled “HELPS” with no content.

Generating the static site with hugo --verbose updates pages index.html, 404.html, index.xml. sitemap.xml with the same empty content as above. The help pages appear in sitemap.xml.

I’m still sort of stuck working out if I’m using permalinks correctly. I’m expecting /help/ to work identically to /blog/. Any ideas what I’m missing?

This is the test site:


Adding a link to your website doesn’t help us help you. The source would help.

Here’s the complete site ZIP:

Posted link to ZIP file which is pending Admin clearance.

It would probably get a better response if you link to, say, a GitHub repo or similar where we could look at the source.

Sorry, don’t have this in Github. Guess I’ll have to wait for the documentation to catch-up.

That is a backhanded and disgraceful response, and I’ll tell you why: everyone is volunteering here, including the folks updating the docs. We are in this together, rather than a drive-thru window for technical advice. In the future, please be more considerate and less dismissive.

Also, you issue is with the range in /themes/hugo-universal-theme/layouts/_default/list.html:

{{ $paginator := .Paginate (where .Data.Pages "Type" "blog") }}
{{ range $paginator.Pages }}

This is a theme-specific issue, so please read the pagination and iteration in templates docs, and then seek assistance from the theme creator.

1 Like

@maiki thanks for unusual welcome to the community … and these pointers!

I’ll drop back here and contribute some config when I’ve got it all working. :smiley: