Closed shirooo39 closed 2 years ago
To my knowledge Pelican core does not have such a thing. I don't think it's ever been needed before, but maybe there are plugins that offer such functionality.
I think a dict
is probably the way to go, instead of three lists.
@shirooo39 I did something similar with my site. I wound up forking and editing the sidebar template file for my site's theme to build the list.
However, now that I think about it, I think it is possible to do what you want. The original version of the theme that I use has code for it in the templates/base.html file. Check this out and see if it makes sense:
https://github.com/mc-buckets/brutalist/blob/master/templates/base.html#L84
Many thanks for the suggestion, @virtadpt!
@shirooo39: If we can be of further assistance, please let us know.
Issue
Hi! I'm currently writing a Material Design theme for Pelican, but I'm stuck.
in my theme, I want to have the flexibility to add or remove multiple navigation links, which each of them could have an icon right next to them and this have to be easy for non-tech people.
I tried to write it as a Python list, but I just can't get my head to work as it might involves multi-dimensional list, or a dictionary containing multiple values, or a bunch of for loops. I don't know, I have no idea for now...
in the config.py: example using multiple lists
I want to be able to assign each URL and ICON that corresponds to the NAME.
my real question, does Pelican support something like Jekyll's data files?
if there is support for this, writing themes will be much more easier (hopefully).
I can forget about the lists or dictionaries and have the items written like:
data file: navigation.yaml
these items can be accessed globally. would be even better if the items can be iterated
Note: Please don't automatically close this issue, I'll close it once I could figure out how to do what I needed in the above. I do need the help from anyone seeing this open issue.