Markdown filename conventions

In your Hugo projects, for pages such as blog posts or news articles, do you include dates (or even timestamps) in .md filenames even if these files already include a frontmatter date attribute? Example: 20260423-some-news.md vs some-news.md.

Is including timestamps in .md filenames

  1. good, bad or neutral in terms of the organisation of a Hugo project?
  2. good, bad or neutral in terms of SEO?

Neutral. Only argument for having dates in file name, alongside the front matter, is if you want better chronological organisation of your files.

It depends. If you don’t define a URL or slug in front matter, your file name becomes the URL slug.

You can have the best of both worlds. Use a dated filename for organisation, but explicitly set a clean slug or url in the Markdown frontmatter.

Alternatively, you can try this. Scroll down a bit to see the example.

[frontmatter]
  date = [':filename', ':default']

indeed allows the best of both worlds. This seems to work for .md files only though. Is there a way to apply the same date stripping logic when building the slug but for files under static/? the goal would be to have all content files - .md, .pdf, etc. - prefixed with dates but these never showing up in slugs.

No.

You could move the static files into the assets directory, or mount static to assets, then create an init partial that uses resources.Copy to rename, then call the resource’s Publish method. If it were me, I wouldn’t bother. But it’s possible.

If it were me, I wouldn’t bother.

Agree, fair enough.