simonhaenisch/md-to-pdf

Improve documentation around Marked plugins

simonhaenisch opened this issue · 0 comments

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 #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.