How to add a custom footer to my Documenter-generated pages?

Hello, I need to add a ````@raw HTML` block at the end of each of my .md pages to embed a script that uses GitHub issues as page comments.

I could add it manually to every page, but it is not elegant, and I don’t want the actual content to be boated with these “site side” issues.

Is there a way I can hack in the makeDoc call to add the footer on the fly ?
Some of my pages are coming from *.jl files from Literate.jl, but others are original *.md pages, and in that case, if I add indeed the footer in the *.md pages, like in the MakeList function, then I would change the original source files!

I have tried to use the keyword footer on the HTML() call, but, aside that even if it would work, it would put the comments too down to the page, but that parameter wants a single markdown line, while I need to pass it a @raw HTML lock.

Is there no way to specify a footer within the page content area ?

Alternatively, isn’t possible to pass to documenter the markdown inputs of pages as a string or a IOBuffer instead of a file? In this way I could do the modifications before passing makedocs without touching the original files.
Also, this could simplify the interaction with tools like Literate.jl, as we could pipe its output to makadoc onstead of passing trough a temporary .md file…

Or maybe simply to implement, makecall could have a customisable callback with filename, filecontent (and perhaps position in the sidebar), so we could employ our own functions…

I am not sure you would want to pass this via the footer keyword. The page style doesn’t really expect a large complex object in that part of the page, so it may break.

I would suggest just adding at-raw blocks at the end of each .md file. If you don’t want to do it manually, you could run a Literate-like preprocessing to add them.

That said, if you are interested in doing pre-processing on the AST level, I do have an ancient branch to try to support different parsers, which you can take a look at. But basically the idea is that you need to provide something that returns the Markdown AST to Documenter, and so this could also be used for preprocessing: Integrating Documenter with parsers for non-markdown documents · Issue #1074 · JuliaDocs/Documenter.jl · GitHub