SitePoint
  • Blog
  • Discord
  • Forum
  • Library
  • Login
Join Premium

A Beginner’s Guide to Creating a Static Website with Hugo

Close
  1. Preface
    • A Beginner’s Guide to Creating a Static Website with Hugo
    • Notice of Rights
    • Notice of Liability
    • Trademark Notice
    • About SitePoint
  2. 1A Beginner’s Guide to Creating a Static Website with Hugo
    • Meet Hugo
    • Getting Started
    • Front Matter
    • Content Organization
    • Archetypes
    • Taxonomies
    • Shortcodes
    • Creating a Custom Theme
    • Using Data Files
    • Translating Your Website
    • Deployment
    • Conclusion

You don't have any bookmarks for this book yet.

A Beginner’s Guide to Creating a Static Website with Hugo

  • create a thrash folder inside bands
  • move metallica.md there
  • visit http://localhost:1313/bands/thrash/ —where you’ll see a blank page

To fix this, you have to create a content/bands/thrash/_index.md file:

---title: Thrash Bands Archive---

After that, the http://localhost:1313/bands/thrash/ page will list all posts inside the thrash section.

Archetypes

The next term we’ll discuss is called an archetype. Basically, archetypes serve as blueprints that are used when creating new content files using the hugo new command. Specifically, archetypes dictate which front matter variables your content should have.

So, when you run this:

hugo new bands/my_band.md

… Hugo will utilize the first archetype found in one of the following files:

End of PreviewSign Up to unlock the rest of this title.

Community Questions