lukasgeiter / mkdocs-awesome-pages-plugin

An MkDocs plugin that simplifies configuring page titles and their order
MIT License
452 stars 35 forks source link

Fix handling of custom section titles #75

Closed kamilkrzyskow closed 1 year ago

kamilkrzyskow commented 1 year ago

Fixes #73 To handle custom titles for sections the get_title function required access to the AwesomeNavigation.meta.sections structure to access meta properties of a given section item. One option was to pass the self reference as a parameter, but there was no such case in the code base. Therefore, I decided to transform the function into a class method to keep the current style. ✌️ I'm assuming no additional tests are needed.

lukasgeiter commented 1 year ago

Thanks for fixing this! The code looks good. That said, I would like to see a test that fails before the fix and passes after it.

kamilkrzyskow commented 1 year ago

Emotional damage... ok I shall see what I can do.

kamilkrzyskow commented 1 year ago

@lukasgeiter I think this should do the trick ✌️

lukasgeiter commented 1 year ago

Much appreciated, thanks Kamil!