getnikola / plugins

Extra plugins for Nikola
https://plugins.getnikola.com/
MIT License
59 stars 95 forks source link

[hierarchical_pages] Incorrect behavior when pages have different extensions #337

Open uyar opened 4 years ago

uyar commented 4 years ago

In the example given for this extension, change the extensions of the files for the /about/team/ page to html:

about/team.html
about/team.de.html

Now when you run nikola build you get the following URLs in the German section:

/de/ueber/
/de/ueber/firma/
/de/ueber/team/
/de/ueber/team/nikola-tesla/
/de/ueber/team/roberto-alsina/

I've checked the code of the plugin to find out why and how to solve it but I couldn't be confident enough to implement a change. I think this comes from the way the globs are generated. I mean, during scanning the about/team/nikola-tesla.rst is encountered before about/team.html (because rst comes before html in conf.py) and sets an incorrect slug for about/team. Maybe scanning level-by-level first would solve the issue.