# Seminar pages

## Overview

The main code for a seminar page located at /seminars/[SEMINAR_NAME]/[SEMINAR_NAME].html (example on GitHub) looks quite simple. Here is an example (in the actual page there are more links to archives):

### Core functionality

The main day-to-day content in the seminar pages is taken from google calendars. Each seminar has its own google calendar, and a javascript code on the page pulls the seminar entries and displays them in a nice format on a seminar page. The seminar organizers continue to update their seminar’s google calendars as usual.

The fields content="" and contacts="" allow to add some extra content into specific places on the automatically generated seminar page: the first field adds before UPCOMING TALKS list, and the second field - before the Contact: information at the bottom of the page.

The unified list of talks is displayed on the main page. Note: only 180 days of seminars are displayed on the main page and on the “all seminars” page http://math.virginia.edu/calendar/. Seminars further in the future can be found at the individual seminars pages.

### Archives

###### More recent

The recent archives using google calendars are displayed year by year, semi-automatically: one simply needs to create archive pages each year - these can be copied from a previous example like at this GitHub link.

Note: Links from google calendar entries displayed on seminar pages can be broken over time (i.e. when the linked external URL becomes unavailable). There is currently no way implemented to control this because these links are grabbed by javascript. This issue does not affect the displaying of more recent seminar talks, and will likely not be fixed.

###### Older

Older archives not using google calendar were moved manually from the old seminar pages.

### Where the magic happens

The key to how this works is in the field permalink: /seminars/colloq/ which tells the builder that this page corresponds to the Colloquium. Similarly, for the seminar archive pages the key field is something like permalink: /seminars/colloq/2015-16/ which tells the builder to look at the Colloquium. The title: field in both cases is not essential and can be changed.

The main information on seminars is contained in _data/seminars.yml (this file on GitHub). Its structure is explained below.

The javascript code which generates talks lists is in the files _includes/cal_main.js (for the main page the unified list of talks is displayed; file on GitHub) and _includes/cal_single.js (for individual seminar pages and archives; file on GitHub).

## Seminars data file

_data/seminars.yml (file on GitHub) is the main file which contains all information about seminars. An example of a seminar entry is below:

Some configuration fields are self-evident. Here are explanations for the rest:

cal_number

Do not touch this entry, it is needed for correct identification of the seminar in the list of upcoming talks on the main page.

shortname

This is the main seminar identifier which is used in permalinks is seminar pages.

image

Put the image file (jpg or png, any size/dimensions, but square and up to 600x600 preferred) into the folder /img/seminars/ in the source code, and link it in a configuration field as above.

Important! keep the __SITE_URL__ prefix as is, this is needed for correct automatic generation of the website.

published_in_nav

Smaller and less regular seminars can be excluded from the navigation bar by setting published_in_nav to false.

webpage

This is a link to the old seminar webpage, if needed. Once all archives are moved, this field can be eliminated which will eliminate the link from the seminar page

Identifier of the goolge calendar associated with the seminar, for display on the website.

seminar_weight

The bigger this parameter the lower is the seminar in the list of seminars (in the navigation bar and on the seminar pages).

information

Under information: | field, put a paragraph’s description of the seminar. This is displayed on the seminar page and on the page listing all seminars.

## How to change seminar pages

### Changing seminar information

To change information of an existing seminar, edit _data/seminars.yml. To add additional information to the seminar page, add it to content="" or contacts="" in the /seminars/[SEMINAR_NAME]/[SEMINAR_NAME].html corresponding to the seminar.

Advanced. To make even more changes to the page of a seminar you can copy the template in /_includes/seminar_page.html into the content section (below second ---) of the seminar page /seminars/[SEMINAR_NAME]/[SEMINAR_NAME].html, and make deeper edits there.

1. The seminar should be described in the _data/seminars.yml file
2. The simple seminar page (and, optionally, archive pages) must be manually created at /seminars/[SEMINAR_NAME]/[SEMINAR_NAME].html. The permalink configuration field of that .html file should match the seminar shortname.
3. The seminar is added to the unifying google calendar script _includes/cal_main.js for display on the main page. This requires adding the corresponding google\_cal\_id to the list of google calendar id’s in the beginning of the script, and also adding a corresponding line to the function function getSeminar(num)
The google calendar feature allows to create pages with event lists displayed from google calendar, but not linked to the “all seminars” page on the unifying calendar on the main page. This might be suitable for a reading or a graduate seminar. To do this, one should imitate /_includes/seminar_page.html and hardcode the values in a standalone page. The key line of code displaying google calendar events is