Plugins

PRPL has a library of official plugins offering common build time functionality not contained in @prpl/core:

Module Description
@prpl/plugin-aws Plugin for working with AWS S3
@prpl/plugin-code-highlight Plugin for highlighting code blocks
@prpl/plugin-css-imports Plugin for resolving CSS imports
@prpl/plugin-html-imports Plugin for resolving HTML imports
@prpl/plugin-rss Plugin for generating RSS feeds
@prpl/plugin-sitemap Plugin for generating a sitemap

This page contains links to each plugin's source code, a brief description, as well as notes on dependencies (if any) and exported functions.


AWS

@prpl/plugin-aws is a plugin for working with AWS S3. Useful if you would rather have your content files stored in S3 instead of checked in under version control.

Relies on one dependency, aws-sdk.

Exported functions:

Name Description
fetchFromS3 Fetch file(s) from an S3 bucket and write to the local file system
uploadToS3 Upload file(s) to an S3 bucket from the local file system

See @prpl/plugin-aws for full usage and examples.


Code highlighting

@prpl/plugin-code-highlight highlights code blocks with Highlight.js.

Relies on two dependencies, highlight.js and html-escaper.

highlightCode is the only exported function. See the source code for its signature.

See @prpl/plugin-code-highlight for full usage and examples.


CSS imports

@prpl/plugin-css-imports resolves CSS import statements at build time. Useful to avoid extra requests at runtime for imported CSS files.

Relies on zero dependencies.

resolveCSSImports is the only exported function. See the source code for its signature.

See @prpl/plugin-css-imports for full usage and examples.


HTML imports

@prpl/plugin-html-imports resolves HTML import statements at build time. Useful for reusing blocks of HTML in your source code and avoiding extra requests at runtime.

Relies on zero dependencies.

resolveHTMLImports is the only exported function. See the source code for its signature.

See @prpl/plugin-html-imports for full usage and examples.


RSS

@prpl/plugin-rss generates Atom feeds.

Relies on zero dependencies.

generateRSSFeed is the only exported function. See the source code for its signature.

See @prpl/plugin-rss for full usage and examples.


Sitemap

@prpl/plugin-sitemap generates a sitemap.

Relies on zero dependencies.

generateSitemap is the only exported function. See the source code for its signature.

See @prpl/plugin-sitemap for full usage and examples.


See guides next.