4 Content Management with Hugo

 

This chapter covers:

  • Organizing Pages in a Hugo website into sections, menus and Hugo taxonomies
  • Bundling contents of a page into a Page Bundle
  • Using Hugo’s built in and community provided shortcodes to get more features in markdown.

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 together, tagged and navigation cues are present in pages for the reader to navigate to others.

In this chapter we will be playing the role of the editor of the Acme Corporation website. We will be looking into content organization and management as well as setting up content templates, configuration and markdown extensions (called shortcodes in Hugo) to be used in the website.

4.1  Customizing with the Hugo config

In the Acme Corporation website so far, we have had only one config file config.yaml where we have been piling our configuration together. If we look at the Hugo documentation, we notice that there are many parameters that can be changed and this can get overwhelming very quickly. A single config file is bound to become a bottleneck.

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

4.5.3   Built in shortcodes

4.6  Content Sharing via Custom Shortcodes

4.6.1  HTML shortcodes

4.6.2  Markup based shortcodes

4.6.3  Inline shortcodes

4.7  Summary

sitemap