params are not optional
Closed this issue · 1 comments
the config.toml says, some params would be optional, but they are not.
[params.sidebar]
# Optional about block for sidebar (can be Markdown)
about = "A simple Hugo theme based on the [Bootstrap v4 blog example](http://v4-alpha.getbootstrap.com/examples/blog/)."
# How many posts to show on the sidebar (Default: 5)
#num_recent_posts = 2
[params.social]
# Optional, used for attribution in Twitter cards (ideally not a person
# for example: nytimes, flickr, NatGeo, etc).
# See: https://dev.twitter.com/cards/types/summary-large-image
twitter = "username"
when removing them, hugo will report a big warning:
Building sites … WARNING: calling IsSet with unsupported type "invalid" () will always return false.
would be nice if those could just be deleted because i do not use those social things, nor do i need the sidebar
Hi @damnms. The parameters are optional, but you need to leave the [params.sidebar]
and [params.social]
blocks uncommented. The code in layouts/partial/sidebar.html
currently does this:
{{ if and (.Site.Params.sidebar) (isset .Site.Params.sidebar "about") }}
It's been almost four years since I wrote that, so I'm not sure why it doesn't work when [params.sidebar]
is commented out...
P.S. I don't plan on modifying the theme to work without the sidebar because it's modeled on the Bootstrap blog example and also I don't have much time to re-work the CSS.