News item spec template
News item spec template
This template defines the recommended schema for files in _news/.
Why this exists
- Keep news rendering stable on
/news/and homepage snippets. - Ensure each item exposes a clean excerpt for list views.
- Keep sorting/filtering by date predictable.
- Keep event tagging consistent across all news items.
Current rendering behavior
- News index page reads
site.news, filters out future-dated items, sorts by date descending, and groups by year. - Homepage (
/) reads the samesite.newssource and supports umbrella-category chip filters. - Homepage optionally renders a
Pinned Newsblock aboveRecent Newswhen one or more entries includepinned: true. - Pinned block is sorted by date descending and capped at 3 entries.
- Pinned entries may also appear in the
Recent Newslist. - Homepage
Allfilter shows the 5 most recent items across all categories. - Homepage category filters show the 5 most recent items within the selected umbrella category.
- Homepage hides umbrella chips that have zero matching items.
- Homepage list keeps title, date, and excerpt display, and inserts year delimiters when visible items span multiple years.
- Homepage “View all news” link preserves the active umbrella filter via
?category=<umbrella-group-slug>. - Excerpt text is split by
<!--news-excerpt-->. - News page supports client-side filtering by umbrella category (derived from
_data/news_tags.yml). - Active news filter can be shared/persisted with
?category=<umbrella-group-slug>on/news/.
Required front matter
title(string)date(YYYY-MM-DD)layout: archiveauthor_profile: trueexcerpt_separator: "<!--news-excerpt-->"geo(map-ready geographic encoding; required by CI validator in this repository)
Optional front matter
tags(array of canonical slugs from_data/news_tags.yml)pinned(boolean; whentrue, item is eligible for homepagePinned News)
Canonical tag taxonomy
- Source of truth:
_data/news_tags.yml - Tag values in news front matter must use
slugvalues from that file. - Front matter must store leaf tags only (for example
publication,conference_talk,grant). - Do not add umbrella/group tags directly to news item front matter.
- Umbrella categories are derived from each leaf tag’s
groupvalue in_data/news_tags.yml. - Recommended usage:
1-3primary tags per item, plus optional modifier tags. - Use
student_contribution(modifier tag) when a student advisee is a notable contributor (for example lead/co-lead author or presenter).
Geo encoding for map parsing
- Goal: keep all geodata self-contained in each news file front matter for downstream JS parsing.
- Repository policy: every
_newsentry must include ageoblock so CI validation and map generation succeed. - Required structure:
geo.version(integer, must be1)geo.scope(string:event,global, orvirtual)geo.countries(array key required for all entries)geo.localities(array key required for all entries; may be[])
geo.countries[]fields:code(required; ISO 3166-1 alpha-2, uppercase, for exampleUS,EC,GB)region_m49(required string; UN M49 3-digit region code, for example021)weight(optional number; defaults to1)
geo.localities[]fields:name(required string)country_code(required; ISO 3166-1 alpha-2)lat(required number)lon(required number)weight(optional number; defaults to1)
- Scope-specific rules enforced by validator:
geo.scope: globalmay use an emptycountrieslist.- non-global scope must include at least one country row.
- Locality-specific rules enforced by validator:
- use
localities: []when no locality can be inferred. - if
localities:block is present, each item must includename,country_code,lat, andlon.
- use
- Parsing guidance:
- Choropleth country density should use
geo.countries[].code. - Current career-footprint map aggregates to unique event counts per geography; duplicate country/locality rows within one entry are deduplicated at render time.
geo.scopeis preserved in generated JSON for compatibility, even though current UI aggregates all scopes together.
- Choropleth country density should use
Strongly recommended body structure
- First paragraph: short full item text.
- Insert
<!--news-excerpt-->. - Second paragraph: concise summary line for list views.
- Prefer markdown links with short labels (for example
[DOI](https://doi.org/...)) over raw bare URLs in excerpt/body text. - For currency mentions, prefer plain text like
USD 1,340over escaped dollar notation (for example\\$1,340) to avoid unintended MathJax inline parsing.
Copy/paste template
---
title: "NEWS TITLE"
date: YYYY-MM-DD
layout: archive
author_profile: true
excerpt_separator: "<!--news-excerpt-->"
# pinned: true
tags:
- conference_talk
- invited_talk
geo:
version: 1
scope: event
countries:
- code: US
region_m49: "021"
weight: 1
- code: EC
region_m49: "005"
weight: 1
localities:
- name: "Seattle"
country_code: US
lat: 47.6062
lon: -122.3321
weight: 1
---
Full news text (1-3 sentences) with any links.
<!--news-excerpt-->
One-sentence excerpt used in list pages.
Validation checklist
- Date is valid ISO format and not accidental future date.
- Excerpt separator exists exactly once.
- Item appears in
/news/year group and homepage recent list. - If
tagsis present, every tag exists in_data/news_tags.yml. - Long links in body/excerpt are represented as markdown links (or wrapped text), not long raw URL strings.
geoexists and includesversion,scope,countries, andlocalitieskeys.geo.versionis1, andgeo.scopeis one ofevent,virtual,global.- Every country row includes ISO alpha-2
codeand 3-digitregion_m49. localitiesis either[]or a complete list where each item hasname,country_code,lat, andlon.