SitePoint
  • Premium
  • Library
  • Community
  • Save on SaaS
  • Jobs
  • Blog
LoginStart Free Trial
Preface
1

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:

Code snippet

---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:

Code snippet

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.
On this page

Community Questions

Previous
Finish