Replies: 1 comment
-
|
https://properdocs.org/dev-guide/plugins/#events +
Based on this, even writing a hook seems to be only possible with huge hacks. Maybe something like this would work: def on_page_markdown...:
if page.file.src_uri == '...':
config.markdown_extensions.append('my_extension')
def on_page_content...:
if page.file.src_uri == '...':
config.markdown_extensions.remove('my_extension')Ah or maybe this is better: def on_page_markdown...:
if page.file.src_uri == '...':
config.markdown_extensions.append('my_extension')
else:
try:
config.markdown_extensions.remove('my_extension')
except ValueError:
pass |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm curently facing a scenario where I want to append heading numbering in a specific page (1.1, 1.2, ... to
<h2>tags and so on).I've written a small Python Markdown extension that does that for me, but, I would like it to be enabled only on certain pages and not all the site.
Does exist some mechanism to enable/disable certain Markdown Extensions in specific pages? If not, would it be feasible to add the feature?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions