You can find the available plugins for a site using the ASF-Pelican template in the themes/plugins
folder of your website's project repository.
The plugins operate at various points in a Pelican build.
Pelican uses signals at various points.
Here is a high-level review of the sequence of events:
Settings for a Pelican build are in your Pelican configuration file, pelicanconf.py
. Here is where you list the plugins you are using.
PLUGIN_PATHS = ['./theme/plugins']
PLUGINS = ['asfgenid', 'asfdata', 'pelican-gfm', 'asfreader']
At initialization, Pelican reads any ASF_DATA into a metadata dictionary that is available in every page in the site.
.asfdata.py
reads an .asfdata.yaml
file and creates the metadata dictionary.ASF_DATA_YAML = ".asfdata.yaml"
ASF_DATA = {
'data': ASF_DATA_YAML,
'metadata': { },
'debug': True
}
./asfgenid.py
configures the site's features.# Configure the asfgenid plugin
ASF_GENID = {
'metadata': True,
'elements': True,
'headings': True,
'headings_re': r'^h[1-4]',
'permalinks': True,
'toc': True,
'toc_headers': r"h[1-4]",
'tables': True,
'debug': False
}
The system sets two important readers at this point. Readers are responsible for transforming page files to html and providing a metadata dictionary.
ASFReader,
.asfreader.py) transforms an ezt template into GFM and then to HTML.
This is signaled after a reader has processed the site's content. At this point plugins can review, record, and transform the html content.
./asfgenid.py
, performs a number of steps. Some of the steps are optional.
Many projects had their websites served by the Apache CMS from 2010. It was deprecated in 2021. The CMS was written in Perl. We have a new approach that fits Pelican.
If you want to look into the old CMS process, its Subversion repository and history remain available.
Copyright 2022, The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache® and the Apache feather logo are trademarks of The Apache Software Foundation...