List page with custom URL

Hello,

I tried to create list of all posts from my blog with custom URL.
For example, by default Hugo create list for all blog posts with URL /post/index.html

For this Hugo used layouts from _default/list.html file.
How I can create URL such /articles.html with all posts from my blog, which contains in directory content/post ??

I’m looking all similar pages, but not found look like this.

Hi there,

You need to set uglyurls to true in your config.yaml.
This will then create your post page at /post.html, your content/contact.md at /contact.html etc…

Then you need to define a custom url for this post page. So you create a content/post/_index.md. By doing so you can now add some front matter to your post section page:

title: Articles
url: /articles

You post section page should now live at /articles.html.

I tryed your suggestion. But so sad, this post section will create page:
/articles/index.html
not
/articles.html
uglyurls wa setted to true in config file.

Full config file:
baseURL = “https://dazzling-raman-8ff0f7.netlify.com/
languageCode = “en-us”
title = “Denis Evsyukov”
theme = “juev”
canonifyURLs = true
uglyurls = true
[params]
layoutReverse = true
[permalinks]
post = “/:year/:month/:day/:slug/”
[indexes]
category = “categories”
tag = “tags”
[frontmatter]
date = [":filename", “:default”]

Have you tried setting url: /articles.html in your post section front matter ?

Do you have a repo with your code?

Yes, Code for this I stored in https://github.com/Juev/hugo-netlify
When I set url: /articles.html I get this file, but not html, but xml with rss content

Yes, I cannot explain why urglyURLs config param does not have any impact on your project. It works well on several of mine :thinking:

I changed post directory to articles, then change parameter in config.toml:
[permalinks]
articles = “/:year/:month/:day/:slug/”
[indexes]
tag = “tags”
articles = “articles”

And option urglyURLs get articles.html page in root directory.
It’s not clear way for me.