Skip to content

romainguy/markdeep-rasterizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages