Customization

Describes common Mainroad theme configuration parameters that can be adjusted via config file or via Front Matter section.

Customization page describes common Mainroad configuration parameters which can be specified via configuration file or via Front Matter section. That includes logo section tuning, adding a sidebar with widgets, adjusting highlight color, and more.

This section will mainly cover customization settings that are unique to this theme. If something is not covered here, there’s a good chance it is covered somewhere in Hugo docs.

Mainroad allows you to set a custom logo in the site header. You may use text, or image, or both. Use the following options in your site config:

[Params.logo]
  image = "img/placeholder.png"
  title = "Mainroad"
  subtitle = "Just another site"

Note: logo image will display at a maximum width of 128 pixels and a maximum height of 128 pixels when you use text and image simultaneously. When the only logo image is active, it will display at a maximum height of 256 pixels. Ideally, your logo image should be SVG.


If you don’t set any of these variables, the theme uses the site title as a logo title. Don’t need a logo section? Disable it this way:

[Params.logo]
  image = false
  title = false
  subtitle = false

Highlight color