7 Creating your own theme

 

This chapter covers:

  • Creating multiple layouts for content with shared base template.
  • Understanding front matter cascades in Hugo
  • Creating index and taxonomy pages to navigate through the website.
  • Creating a Hugo theme that can be reused across multiple websites.

In chapter 6 we started moving off Eclectic and started creating the underpinnings for a new theme. We created a new content type called Acme which has custom template code that we will be converting to a full theme in this chapter. We will be migrating the major pages of the Acme Corporation website to this new theme. We will also convert this newly created theme into a Hugo module that can be reused.

7.1 More ways to lay out content

 
 

7.1.1 Parameterized front matter to differentiate the news page interface

 
 
 

7.1.2 Using the Cascade property to apply properties to front matter of multiple pages

 

7.1.3 Providing a different layout to the blog content

 
 

7.1.4 Cascade side effects and local overrides

 
 
 
 
 

7.2 Updating the index pages by providing content and subsection lists

 
 
 

7.2.1 Using the list template for index pages

 
 
 

7.2.2 Creating multiple pages to render a long list

 
 
 
 

7.2.3 Using a custom paginator

 
 
 
 

7.2.4 Rending a list of subsections

 
 
 

7.3 Providing the taxonomy pages

 
 

7.3.1 The terms page

 
 
 

7.3.2 The taxonomy pages

 

7.4 Creating our own theme

 
 

7.4.1 Moving to a new theme

 

7.4.2 Aligning content with the theme

 
 

7.4.3 Providing theme assets

 

7.5 Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest