You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the customizations I made to my (now pretty outdated) fork of this theme was the ability to specify a custom layout called sidebar_links that gives another container in the sidebar with links to other sites. You can see this in action on my podcast site under the Subscribe box. I've gotten positive feedback on this from my listeners (even with my previous version of the site based on Nikola) so I'm wondering if it would be worthwhile to add in some capacity here. As far as implementing this, here's what I did (acknowledging that it is rather cludgy and not easy to generalize):
Separate out the subscribe and links portions of the sidebar layout as separate partials (sidebar_subscribe.html and sidebar_links.html) and have the sidebar.html simply include them. Note that the sidebar_links.html is empty
Within my site files, populate a partial sidebar_links.html following a similar format as the subscribe RSS layout but with the links hard-coded as typical <li> list items.
Ideally if there was an easy way to define say an array of site links as a configuration option in config.toml and have a layout dynamically populate the links in the custom layout that would be far more optimal, but when I made this enhancement I was just beginning to learn Hugo and just needed something quick. Hope all of this makes sense!
The text was updated successfully, but these errors were encountered:
I've already been sorta thinking of making partials for each widget anyway, so this should be fairly straightforward.
Doing this in config.toml wouldn't be too very bad; I consider it similar to the author/host thing. In the theme that inspired this I had shortcodes for making links for books, podcasts, etc, but shortcodes only really work in a content file.
This should be pretty easy to implement, and I'll try to work on it today :)
One of the customizations I made to my (now pretty outdated) fork of this theme was the ability to specify a custom layout called
sidebar_links
that gives another container in the sidebar with links to other sites. You can see this in action on my podcast site under the Subscribe box. I've gotten positive feedback on this from my listeners (even with my previous version of the site based on Nikola) so I'm wondering if it would be worthwhile to add in some capacity here. As far as implementing this, here's what I did (acknowledging that it is rather cludgy and not easy to generalize):sidebar_links.html
is empty<li>
list items.Ideally if there was an easy way to define say an array of site links as a configuration option in
config.toml
and have a layout dynamically populate the links in the custom layout that would be far more optimal, but when I made this enhancement I was just beginning to learn Hugo and just needed something quick. Hope all of this makes sense!The text was updated successfully, but these errors were encountered: