Don't make /blog/ directory (since I have all articles listed under homepage)

Since I already list and paginate all my articles on my homepage (root) website.com, I don’t need the additional /blog/ page with a list of all articles since this is pretty much a duplicated content.

My goal is to get rid of /blog/ page altogether. - how can I achieve it?

When I remove the list.html from Hugo’s layouts/blog/ directory, that does not solve the problem because instead, Hugo will render the layout/_default/list.html content.

In case you need more info, this is the structure of my files inside the Hugo’s content directory:

content/
  blog
    - article-1.md
    - article-2.md
  about.md
  contact.md

And part of my config file:

permalinks:
  blog: "/:slug/"
  categories: "/category/:slug/"
  tags: "/tag/:slug/"

create a markdown file under /content/blog/_index.md, set frontmatter with build options:

---
_build:
  render: never
---

More on Build options:

2 Likes

That was so simple! Thank you so much & I learned something new :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.