Skip to content

What should I do on writing plugins when each document's metadata affects other documents? #3553

Answered by oprypin
McDic asked this question in Q&A
Discussion options

You must be logged in to vote

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:

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

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@McDic
Comment options

Answer selected by McDic
Comment options

You must be logged in to vote
1 reply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants