Skip to content

(remark): Support for passing through remarkRehype configuration #517

@marcus-crane

Description

@marcus-crane

Enter your suggestions in details:

Hey there,

I've been porting my site over to Lume, which has been quite enjoyable so far. My blog makes use of Littlefoot which is a small JS library for inlining footnotes.

With Lume, I'm also using Remark which is nice but by default, generates some footnotes with syntax that Littlefoot can't quite work with.

The fix for this is just to override how the footnotes are rendered but doing that requires being able to pass through some configuration to remarkRehype.

Unfortunately, it isn't possible to do this, as remarkRehype is initialised with some default settings and isn't reachable from _config.ts so I'd like to request that it be opened up for passthrough.

On a side note, and some of this is really down to Deno using URLs as identifiers, I was pleasantly surprised at how easy it was to pull the remark plugin into my site's repo and make this modification locally.

The references within will break over time of course so I'd still like to request it as something officially supported but it makes me feel a little easier that it's possible to reach into Lume's bowels a little bit for small patches without having to say; fork the entire codebase (not that I would bother to get that far)

I'd be happy to try and contribute a PR as well, although I'd have to have a think about what a good API might look like. I was a bit surprised to see that none of the existing remark config made use of types too 😅

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions