The first lifecycle event to trigger after receiving pages from a source and runs in a child process. The pages can safely be mutated and will be reflected in the final filesystem that gets generated. It must return a collection of pages.

The $afterSource lifecycle event is called with:

  • pages - the collection of pages emitted by the source
  • helpers - an object with useful methods
  • options - the options specified for the plugin in the mosaic config file

The helpers provided with this lifecycle event are listed in the table below.

PropertyDescription
serialiserA matching Serialiser for serialising/deserialising pages when reading/writing to the filesystem
configA mutable object for sharing data with other lifecycle phases of all plugins for this source (including in the main thread) in this plugin
pageExtensionsA collection of pageExtensions the source is using
ignorePagesA collection of page globs that are to be ignored for this source
namespaceThe namespace of the source running the plugin
Mosaic BETA

Coming soon