Render page content
This commit is contained in:
parent
641a157a7b
commit
b68cb5d337
3 changed files with 10 additions and 0 deletions
|
@ -7,3 +7,5 @@ Before image
|
|||
After image
|
||||
|
||||
![Image](https://theorangeone.net/images/ml7eDl0dfJcNa0gb78bceOAZA2Y=/1/width-1200/header.jpg)
|
||||
|
||||
{{ 1 + 2}}
|
||||
|
|
7
hooks/page-render.py
Normal file
7
hooks/page-render.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
def on_page_markdown(markdown, page, config, files):
|
||||
# HACK: Calculate what the `env` should probably look like. By default, `on_env` is called after `on_page_markdown`.
|
||||
env = config.plugins.on_env(config.theme.get_env(), config=config, files=files)
|
||||
|
||||
template = env.from_string(markdown)
|
||||
|
||||
return template.render(page=page)
|
|
@ -10,6 +10,7 @@ hooks:
|
|||
- hooks/nav.py
|
||||
- hooks/tags.py
|
||||
- hooks/images.py
|
||||
- hooks/page-render.py
|
||||
|
||||
markdown_extensions:
|
||||
- attr_list
|
||||
|
|
Loading…
Reference in a new issue