The plugins used operate at various points in a pelican build. Pelican uses signals at various points. These are documented here. At a high level consider the following sequence of events:
Pelican Settings. Settings for a Pelican Build are in your Pelican Configuration
These are automatically created according to your pelicanconf.yaml
into a settings file that would have something like:
PLUGIN_PATHS = ['./theme/plugins'] PLUGINS = ['asfgenid', 'asfshell', 'asfdata', 'gfm', 'asfreader', 'asfcopy']
Init (initialized). At this point any ASF_DATA is read into a metadata dictionary made available in every page.
setup: data: asfdata.yaml
ASF_DATA_YAML = "asfdata.yaml" ASF_DATA = { 'data': ASF_DATA_YAML, 'metadata': { }, 'debug': True }
genid: unsafe: yes metadata: yes elements: yes headings_depth: 4 permalinks: yes toc_depth: 4 tables: yes
ASF_GENID = { 'unsafe': True, 'metadata': True, 'elements': True, 'headings': True, 'permalinks': True, 'toc': True, 'toc_headers': r"h[1-6]", 'debug': False }
setup: run: - /bin/bash shell.sh
ASF_RUN = [ '/bin/bash shell.sh' ]
Readers (readers_init). Two important readers are set at this point. Readers are responsible for transforming page files to html and providing a metadata dictionary
Content Init (content_object_init). This is signaled after a Reader has processed content. At this point plugins can review, record, and transform the html content.
Finalization (finalized). This is signalled after all content is generated and static files copied. At this point additional content can be copied and the final output analyzed.