Plugins

Overview

Scully uses a plugin system which allows users to define new ways for Scully to pre-render an application.
It is simple to register a new plugin.

Types

There are five main types of plugins which allow code to be injected into various stages of the Scully process lifecycle:

router

router plugins teach Scully how to get the required data to be pre-render pages from the route-params.

render

render plugins are used to transform the rendered HTML.
After the Angular application renders, the HTML content is passed to a render plugin where it can be further modified.

fileHandler

fileHandler plugins are used by the contentFolder plugin during the render process. The contentFolder plugin processes the folders for markdown files or other file type the folders may contain. The render process processes any existing fileHandler plugin for any file extension type.

routeDiscoveryDone

routeDiscoveryDone plugins are called automatically after all routes have been collected and all router plugins have finished.

allDone

allDone plugins are like routeDiscoveryDone plugins, except they are called after Scully finishes executing all its processes.