The CNERG web pages are built by processing template files using to incorporate data. Each of the templates has a slightly different expectation of the data it will use.
The navbar
data populates the primary navigation menu. This data file
consists of a list of entries, each of which is a dictionary containing:
title
=> text to be rendered in menuurl
=> link destination if there is no submenusubcategories
=> a list of dictionaries for submenu items, each of which contains:subtitle
=> text to be rendered in submenu- one of:
exturl
=> external URL destination of menu entrytarget
=> browser window target (often_blank
for new tab)
- or:
suburl
=> internal link target of menu entry
The uw_navbar
data populates the top-of-screen menu to link to other UW sites.
It contains a list of dictionaries, with each entry containing:
name
=> hyperlink texturl
=> link destination
These data files are rendered by the desc_list.html
template to generate lists
for which each item has a description and a list of hyperlinks. A specific data
file can be selected in this template by setting the data
variable of the page
data. The data file should have a list of entries, each being a dictionary with:
title
=> text to render as titledesc
=> text to render as descriptionlinks
=> list of dictionaries each with:url
=> URL of linktext
=> text of hyperlink
Data files in this format include:
- events
- tasks_roles
- tools
- resources
- skills
- guides
Examples include the Community Events, and many of the lists of resources in the manual.
These data files contain information that can be used to provide a list of presentations, appearances, or outreach publications, including hyperlinks.
The data is a list of dictionaries, each consisting of:
date
=> date to be rendered as texttitle
=> title of presentationurl
=> link to presentation materials (e.g. published google slides)venue
=> the event, location, publicationvenue_url
=> URL to the venue if availableperson
=> name of individual who appeared/presentedperson_dir
=> CNERG personnel directory
Data files in this format include:
- outreach
Note: this could be replaced by a Zotero-generated file in the future
These data files contain lists of individuals organized into groups. The data is a list of dictionaries, each consisting of:
group
=> the name of the group to be rendered as a headingpeople
=> a list of dictionaries containing data for each individual:name
=> preferred nameurl
=> directory name of person's dataimage
=> image file to be used for that personrole
=> description of role to be included in list
This data is rendered into a grid of photos and text info, each linked to the individual's home page.
Data files in this format include:
- people
The urls
file is a list of urls to be used throughout the site and changed in a single location.
Some data is generated by dumping JSON files from Zotero. These files contain a format defined by Zotero.