rosscdh / mkdocs-markdownextradata-plugin

A MkDocs plugin that injects the mkdocs.yml extra variables into the markdown template
MIT License
83 stars 18 forks source link

Another attempt at resolving nav/page title issues (see #20) #31

Closed miffels closed 3 years ago

miffels commented 3 years ago

Hey,

I just found that my previous change was reverted, which came as a surprise since I haven't been (made?) aware of the resulting compatibility issues. Anyhow, this resulted in nav-related issues returning, that I reported back then:

image

This PR makes another attempt at solving this, by applying Jinja template substitution to both page markdown and titles. You will be able to reproduce the above issue by commenting out page.title = self.apply_template(page.title) in on_page_markdown.

I also took the liberty to refactor a little and remove (presumably) dead code.

rosscdh commented 3 years ago

LGTM.. thanks for your efforts!

rosscdh commented 3 years ago

Ill test and release later hopefully today if i get time