-
I was writing a plugin for my own blog. I was trying to provide list of recently edited posts on index page and I decided to generate special HTML for index page only. But since I am not developing a theme(I use mkdocs-material), I decided to alter markdown text for easier development. According to Mkdocs plugin development documentation, html page is constructed after It seems there isn't any straightforward way to make kind of synchronized global event during some step of I think letting post metadata affect global navigation and optionally some other pages is a valid usecase for many users. So my final questions are..
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You can make a particular page be rendered last. That way you can ensure all other pages' events have run by the time you reach that one. Inside an file = files.get_file_from_path('index.md')
files.remove(file)
files.append(file) Or just append a fresh file without removing anything in the first place |
Beta Was this translation helpful? Give feedback.
-
To make a page's content affect navigation, that needs to be done in |
Beta Was this translation helpful? Give feedback.
You can make a particular page be rendered last. That way you can ensure all other pages' events have run by the time you reach that one.
Inside an
on_files
handler do this:Or just append a fresh file without removing anything in the first place