New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration passthrough for remark-rehype #518
Conversation
Signed-off-by: Marcus Crane <marcus@utf9k.net>
Signed-off-by: Marcus Crane <marcus@utf9k.net>
While there are no tests included, I'll note that I've run through a bunch of manual tests with my own site against the latest master branch. Overwriting the defaults work as expected (Dangerous HTML renders by default but can be stubbed out if the user chooses) as well as extra options like footnote overrides working. Probably some tests could be written but I figure if there are none for Remark already, why start now 😉 On a side note, I think there is probably value in exporting remark types through to |
@@ -27,6 +27,9 @@ export interface Options { | |||
/** List of rehype plugins to use */ | |||
rehypePlugins?: unknown[]; | |||
|
|||
/** Configuration for remark-rehype */ | |||
remarkRehype?: object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd change this option to remarkOptions
object for consistency with rehypePlugins
and to make clear that it contains the options for rehype
, not the remarkRehype
option itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I wasn't quite clear on whether remark-rehype was still technically a remark plugin or if it was a standalone thing of sorts but yeah, that makes more sense
Hi @marcus-crane
|
Ah! That explains a lot re: main being v2 oops. I'll fix that up 🙂 |
Closing this until I open a proper PR from the v1 branch |
Description
This change adds the ability to pass configuration from
_config.ts
down toremark-rehype
.It can be useful for users who need to customise how footnotes are rendered for Markdown files (such as when using Littlefoot as well as a few other things should they be needed.
Related Issues
Implements #517
Check List
CODE OF CONDUCT
CONTRIBUTING
send multiple pull request.
fmt
to fix the code format before commit.CHANGELOG.md
.