fralau / mkdocs-macros-plugin

Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
https://mkdocs-macros-plugin.readthedocs.io
Other
335 stars 51 forks source link

Create a setter for `env.raw_markdown`? #105

Closed fralau closed 2 years ago

fralau commented 2 years ago

Discussed in https://github.com/fralau/mkdocs_macros_plugin/discussions/102

Originally posted by **millerbyte** November 11, 2021 I'm looking into using the `on_post_page_macros` hook, but I am unable to append content to the `env.raw_markdown` string: ``` AttributeError: can’t set attribute ``` I realize that this is probably because `raw_markdown` has no setter, but the documentation doesn't go into detail on how to actually manipulate `raw_markdown`. I'd like to add a footer to each page with the `git.date` data. I'd rather not have to add an `{{ add_footer() }}` macro to each page. Any ideas?
fralau commented 2 years ago

It would be a good idea to have a setter.

fralau commented 2 years ago

Duplicate of #98 (Re)fixed in 8e2e9e6