4 Content management with Hugo

 

This chapter covers

  • Organizing pages into sections and menus in a Hugo website
  • Grouping related content using Hugo taxonomies
  • Bundling page contents into a page bundle
  • Using Hugo’s built-in and community-provided shortcodes for more Markdown features

A website is not just a bundle of web pages scattered at random URL locations. The pages need to be discoverable, organized into meaningful sections, and there needs to be a way to navigate to them for a reader to be successful. Content in most websites is laid out with a strategy; grouped, tagged, and navigation cues are present in pages for the reader to navigate to others.

There are two distinct roles in a website’s development team: the content owner and the theme developer. The content owner decides the content that shows up on the website, and the theme developer focuses on surfacing content. In this chapter, we will be playing the role of the content owner (also called author or website editor) for the Acme Corporation website.

We will look into content organization and management in this chapter (see figure 4.1). In section 4.1, we will organize the configuration in the config folder. In sections 4.2 to 4.4, we will discuss the means to manage and associate content on a Hugo website. Section 4.5 will go into shortcodes, which live in the layouts folder. Shortcodes provide the means to extend Markdown and share content between different pages in Hugo.

4.1 Customizing with the Hugo configurations

4.2 Organizing content with sections and menus

4.2.1 Sections

4.2.2 Menus

4.3 Better together with page bundles

4.3.1 Leaf bundles

4.3.2 Branch bundles

4.3.3 Headless bundles

4.4 More than tags: Taxonomies

4.5 YouTube, Gists, and other snippets via shortcodes

4.5.1 Shortcodes with content

4.5.2 Nested shortcodes

sitemap