Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

carlocastoldi
Copy link

By adding this new event, i'd like to allow plugins to change template based on the page being built.

An example of usage can be seen in this in-development plugin: mkdocs_multi_theme_plugin

Before resorting to this upstream change, i have considered using other events (e.g. on_env), but I am afraid none allow per-page editing of the templates from the ground up.

@lovelydinosaur
Copy link
Member

Heya, is there a discussion or issue associated with this pull request?

@carlocastoldi
Copy link
Author

no, there is no associated issue to my knowledge.

Due to my requirements, i needed to have some pages following a theme, while others using another theme. I tried to only build a plugin, however I soon understood that the best solution required me to modify mkdocs itself.
While, according to my needs, I think I could live just with my small fork of mkdocs, I think this new hook could also be useful to others. Hence why i opened this pull request!

@carlocastoldi
Copy link
Author

fyi, there was a brief discussion associated to something related to this topic: #3645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.