/markdeep-rasterizer

Converts Markdeep (https://casual-effects.com/markdeep/) files to static HTML.

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Markdeep Rasterizer

This module can be used to convert Markdeep files to static HTML. Converting Markdeep files to static HTML greatly improves load times in complex documents. It can also be beneficial to users who choose to disable JavaScript (the generated document still needs JavaScript to render equations though). The conversion is performed using Chromium via Puppeteer.

This conversion can also be attempted using Firefox of Chrome in headless mode from the command line, but the generated result still attempts to execute Markdeep.

Example

Here is an example of a complex Markdeep document before and after conversion to static HTML:

Usage

This module is meant to be executed directly with npx:

npx markdeep-rasterizer <file1> <file2> ... <fileN> <outDirectory>

Where each <fileX> is a path to a Markdeep file ending in .md.html. The output .html files will be generated in the specified output directory.

Here is a real-world example from Filament:

npx markdeep-rasterizer ../../docs/Filament.md.html ../../docs/Materials.md.html  ../../docs/

License

Apache License Version 2.0, January 2004