Skip to content

Include external, raw fileΒ #773

Open
@lukaslueg

Description

@lukaslueg

I'm sorry if this is obvious, I couldn't figure it out, though: Putting a thought into rust-lang/reference#398, one could include a SVG into the book which reacts to the book's CSS variables to stay on par with the theme chosen by the user. This however would require one to include the SVG directly into the final HTML (that is, instead of <object or <img), so that the CSS inherited from mdbook's <body> actually applies.

I can see no way to include a raw, external file into a book's final HTML, given a .md as the starting point. The provided {{#include }} seems to tinker quite a lot with file's content and it destroys the SVG's syntax.

Is there a way to pull raw, external stuff into the final HTML, with .md as the starting point and without using the API ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-link-preprocessorArea: Link preprocessor, #{{include}}, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions