Pelican Builds

This website is built using Pelican.

Content

Content is GitHub Flavored Markdown (GFM) with ASF specific enhancements for Apache CMS style annotations.

These file extensions .md, .markdown, .mkd, and .mdown are processed as GFM. .md is preferred.

The ASF specific enhancements are controlled in pelican settings

# Configure the asfgenid plugin
ASF_GENID = {
    'metadata': True,          # {{ metadata }} inclusion of data in the html.
    'elements': True,	       # {#id} and {.class} annotations.
    'headings': True,	       # add slugified id to headings missing id.
    'headings_re': r'^h[1-4]', # regex for which headings to check.
    'permalinks': True,	       # add permalinks to elements and headings when id is added.
    'toc': True,  	       # check for [TOC] and add Table of Content if present.
    'toc_headers': r"h[1-4]",  # regex for which headings to include in the [TOC]
    'tables': True,	       # add class="table" for tables missing class.
    'debug': False
}

Data

Data is placed into GFM content with a combination of EZT and ASF python style directives.

The file extension .ezmd is processed with ASF python style directives and as an EZT template. Once that is done then the result is processed as GFM.

Data Model

The [data model[datamodel file specifies three types of data:

  1. Constants. These metadata are made available to ezmd, asfgenid, and pelican templates.
- [{ code_lines }]+ lines of code in stewardship
  1. Sequences. These metadata are used by EZT directives and also the ASF python style directives.

    EZT

| Office    | Individual  |
|-----------|-------------|[for projects]
| V.P., [if-any projects.site][[][end]Apache [projects.display_name][if-any projects.site]]([projects.site])[end] | [projects.chair] |[end]
[for featured_projs]<li [if-index featured_projs first]class="active"[end]>
     <a href="#[featured_projs.key_id]" data-toggle="tab">[featured_projs.display_name]</a>
</li>[end]

ASF python style directive

|  |  |  |
|-----------|-----------|-------------|
| [{ board[0].name }] | [{ board[1].name }] | [{ board[2].name }] |
| [{ board[3].name }] | [{ board[4].name }] | [{ board[5].name }] |
| [{ board[6].name }] | [{ board[7].name }] | [{ board[8].name }] |
  1. Dictionaries. These metadata are used by ASF python style directives.

    ASF python style directive - we know the names and forcing a sequence is indirect.

| Office    | Individual  |
|-----------|-------------|
| Board Chair |  [{ ci[boardchair][roster] }] |
| Vice Chair |  [{ ci[vicechair][roster] }] |
| President |  [{ ci[president][roster] }] |
| Exec. V.P |  [{ ci[execvp][roster] }] |
| [[]Treasurer](https://treasurer.apache.org/) |  [{ ci[treasurer][roster] }] |
| Assistant Treasurer |  [{ ci[assistanttreasurer][roster] }] |
| Secretary |  [{ ci[secretary][roster] }] |
| Assistant Secretary |  [{ ci[assistantsecretary][roster] }] |
| V.P., [[]Legal Affairs](/legal/) |  [{ ci[legal][chair] }] |
| Assistant V.P., [[]Legal Affairs](/legal/) |  [{ ci[assistantvplegalaffairs][roster] }] |

Include and Insert

Templates

Pelican uses HTML templates. Templates have pelican metadata and pelican settings.

Theme

See your pelicanconf.py and templates for details.

# Theme
THEME = './theme/apache'

Plugins

# Pelican Plugins
# pelican-gfm is installed in the buildbot as part of build_pelican.py. It is an ASF Infra custom plugin.
# other plugins are discoverable and can be installed via pip by mentioning them in requirements.txt
# You can find plugins here: https://github.com/pelican-plugins
# Plugins that are custom for this site are found in PLUGIN_PATHS.
PLUGIN_PATHS = ['./theme/plugins']
PLUGINS = ['asfgenid', 'asfdata', 'pelican-gfm', 'asfreader']

Content Configuration

Static content is copied and these assets are mixed in with the rest of the content.

PATH = 'content'
# Save pages using full directory preservation
PAGE_PATHS = ['.']
# Path with no extension
PATH_METADATA = '(?P<path_no_ext>.*)\..*'
# We are not slugifying any pages
ARTICLE_URL = ARTICLE_SAVE_AS = PAGE_URL = PAGE_SAVE_AS = '{path_no_ext}.html'
# We want to serve our static files mixed with content.
STATIC_PATHS = ['.']
# we want any html to be served as is
READERS = {'html': None}
# ignore README.md files in the content tree and the interviews and include folders.
IGNORE_FILES = ['README.md','interviews','include']
  1. Data Model How the global data model works and how to enhance the data availble for your content.

  2. EZT How EZ Templates are used convert global data into content.

  3. Markdown How your content is converted to HTML.

  4. Processing How the process works to create the HTML.

  5. Preview Branching How to work on complex changes like updated templates, new data sources, and alternative content.

  6. Local Builds How to setup your local environment to work on a branch.

  7. Error Analysis How to track down errors in your build.