Doctave / doctave

A batteries-included developer documentation site generator
https://cli.doctave.com
MIT License
566 stars 32 forks source link

Update Prism to use autoloader plugin to support all grammars #30

Closed begleynk closed 2 years ago

begleynk commented 2 years ago

Closes #24

Use the Prism autoloader plugin to expand the supported list of languages. This means all grammars are included in the final site bundle, and the autoloader will lazily load them in the browser based on what languages are detected on the page.

The downside is that the bundle is now larger and includes grammars that may not be needed. A future optimization would be to strip those out at build time. Currently I believe this is outweighed by the ease of just having all languages work out of the box. For example Python is not supported as of Doctave 0.3.1, which is...not great.