Plugins are used to create data joins and cross-references, as well as generate pages based on that data. The basic flow is:
- Join private data with public data
- Process snippet data
- Build cross-references between data elements
- Perform canonicalization of names and their ordering
- Copy private asset files to the generated site
- Generate authentication configuration and artifacts
- Generate API endpoints based on the joined, cross-referenced data
- Generate cross-linked pages based on the joined, cross-referenced data
hub.rb is the entry point for this entire process. It contains
Hub::Generator, which performs all of the above steps in order.
There is some coupling between the data in _data, the plugins in this directory, and the page templates in _layouts and _includes.
joiner.rb contains the plugins that join public, private, and
local data into the site.data object.
cross_referencer.rb builds links between site.data
data collections which are used to generate cross-referenced pages.
canonicalizer.rb contains functions used to canonicalize
names and the sort order of collections in site.data.
private_assets.rb contains functions to copy private assets to the generated site, as well as to check for the existence of private assets. It is presumed that private assets may come from a git submodule, rather than appear in the main repository.
auth.rb generates all authentication-related artifacts, including
the logged-in user link and image for each team member and the
hub-authenticated-emails.txt file used by the google_auth_proxy as
described in the Deployment README.
api.rb generates all API endpoints and provides an index under
/api.
The remaining plugins use the joined, canonicalized, cross-linked data to
generate cross-referenced Hub pages. All of these make use of the Hub::Page
class from page.rb.
filters.rb contains Hub-specific Liquid template filters used in page templates.