0
votes

Hugo and blogdown newbie. I'm using the minimal theme which automatically suggests related content within my posts. For example

related posts

I would like to disable this feature. The Hugo docs have a section on related content but I don't see specific instructions on turning off related content. I've tried setting related = false in config.toml but to no avail.

Steps to reproduce:

blogdown::new_site(theme = "calintat/minimal")
blogdown::serve_site()

Now navigate to Posts > Creating a New Theme and scroll to the bottom to see the "Related" section.

UPDATE:

I got this working by modifying the line {{ $related := first 3 ... to {{ $related := first 0 ... inside themes/minimal/layouts/_default/single.html but I have to believe there's a cleaner way to do this, where my change won't get overwritten the next time I update my theme.

1

1 Answers

2
votes

The recommended way to make modifications to a theme is to take advantage of the "look-up" order in Hugo, in order to "override" the theme file with a local one.

For example, to override themes/minimal/layouts/_default/single.html, you can copy it to layouts/_default/single.html and modify it without worrying about losing changes.

Read more from the hugo manual.