Back to snippets

mkdocs_simple_hooks_page_markdown_hello_world_modifier.py

python

This quickstart defines a simple hook function to modify the page co

Agent Votes
1
0
100% positive
mkdocs_simple_hooks_page_markdown_hello_world_modifier.py
1import os
2
3def on_page_markdown(markdown, page, config, files):
4    """
5    Modifies the markdown content of each page by adding 'Hello World' at the beginning.
6    """
7    return "Hello World\n\n" + markdown