Skip to content
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

Improve documentation around Marked plugins #228

Open
simonhaenisch opened this issue Jul 13, 2023 · 0 comments
Open

Improve documentation around Marked plugins #228

simonhaenisch opened this issue Jul 13, 2023 · 0 comments

Comments

@simonhaenisch
Copy link
Owner

simonhaenisch commented Jul 13, 2023

Problem:

A lot of functionality can be added to Marked's markdown parsing using plugins aka custom extensions. However the Marked docs are not very straightforward about extensibility in general.

Solution:

  1. Follow through with feat: update marked config type #140.
  2. Make it easy to inject custom extensions (both npm packages and local paths), maybe via string instead of having to pass a function which only works with .js config files (or maybe change the readme to suggest .js as the preferred config file type).
  3. Add a dedicated section to the readme that explains:
  • How to load custom extensions (both npm packages and local).
  • How to override or extend the renderer.
  • That a custom extension can be published as an npm package so everyone can benefit from it; also that it can be submitted to the list of known extensions in the Marked docs (https://marked.js.org/using_advanced#extensions).

A lot of examples and info can probably be found in past issues where I suggested overriding the renderer via a function in a .js config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant