markdig
markdig copied to clipboard
Rewriting HTML output - where to start?
I need to add additional classes - the bootstrap extension is nice, but it is "only" doing "standard" bootstrap, which is not enough. I need in particular:
- to add more .class depending on the context in markdown
Example would be to have a HR before the 2nd H2 to isolate the top paragraph, or another HR before the last H2.
- rewrite the URL of images also based on context.
The use case here is to change the URL to be a specific size, depending on the context again - but mostly depending on the theme. Full original size is behind a click.
It will be most likely a mix of rewriting some of the builtin renderers and change things in the document object model before rendering it back.