pelican-plugins / more-categories

Enables nested categories and multiple categories per article

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple categories works as expected. Subcategories doesn't work at all.

johnmathews opened this issue · comments

Hi, I've checked and double checked but can't see anything I'm doing that looks out of place.

If I define categories in the usual way in a markdown file as

Category: Technical/Web, demo2, demo3

then I have 3 categories but no subcategories, (or shortname, children, or ancestors).

If I make many subcategories, e.g. Category: Technical/Web/foo/bar, then ancestors: {{article.category.ancestors}} is rendered as ancestors: [, , , ] - the list is created but the entries are something like None.

I'm wondering if this is just me or if this is the same for anyone else?

I'd be happy to help debug if anyone can point me in the right direction.

I took a look in more_categories.py but I don't think theres enough documentation to get my bearings, though maybe that's just my inexperience.

Hi, I had to reinstall my system, so I am working on getting everything working again, to see whether the plugin works with the newest version of Pelican on my own site.

In the meantime, could you tell me what version of Pelican you are running, and whether there were any error messages that mention the more-categories plugin?

Hi, I have pelican 4.5.3, and I don't get any error messages.

Hi again, the plugin is working on my end. I have created an example website in the example directory of this repo. Could you try to generate that and tell me whether that works with your installation?

Your example is working. I'll investigate a bit more to see what's different about my project.

Hello,

As far as I can tell, there weren't any technical problems at all. It works like you said.

My mistake was how I was constructing the jinja2 templates. Maybe its just me, but after reading the README many times I was still constructing the templates wrong.

I "solved" my problem by cut and pasting the snippet from your example project and then changing one keyword at a time.

Thanks for your help!

Glad to hear you were able to adjust your templates to get it to work!

If you have any suggestions as to how the readme could be made clearer, please let me know.