Skip to content

Simple way to modify the HTML output by the HTML renderer? #2598

Open
@njor

Description

@njor

Question

Hello, I need to make some custom modifications to the HTML generated by the HTML renderer before it is written to the HTML files, is there a simple way to do that?
I thought that I could just write another renderer and have mdBook call it after the HTML renderer, but it looks like the file writing logic is inside the HTML renderer, with no way to add some external transformer in between, and that the only way currently would be to write another full HTML renderer.

Is there some simpler way?
Thank you.

Version

mdbook v0.4.43

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-questionCategory: A question on how to do something

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions