7 Creating your own theme

 

This chapter covers

  • Creating multiple layouts with shared base templates
  • Using front matter cascades in Hugo
  • Creating index and taxonomy pages to navigate through the website
  • Converting content type to a theme
  • Building content views to share content between templates

In chapter 6, we started moving away from the Eclectic theme and began to create the underpinnings for a new theme. We created a new content type called modern, which has custom template code. In this chapter, we will convert the modern content type to a complete theme (AcmeTheme). We will also focus on all types of content and how that fits together in a new theme as figure 7.1 illustrates.

Figure 7.1 Chapter 7 focuses on going through the breadth of the website and making sure all pages can move from the Eclectic theme to our new theme. The chapter also goes into the theme/layout split and how to get parts of the page from different areas.
CH07_F01_Jain

7.1 More ways to lay out content

7.1.1 Parameterizing front matter to differentiate the News page interface

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

7.1.3 Providing a different layout to the blog content

7.1.4 Cascading targets

7.1.5 Related pages via Hugo

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 Rendering a list of subsections

7.3.1 The terms page