Roll out site-wide citation popovers, local references, and citation cards (#200)
Summary
PR #1062 introduced site-wide citation popovers ({{< cite >}}, {{< references >}}, {{< citation-card >}}) backed by content/glossary/apa_lookup.json, but only piloted them on three Educators' Corner posts, cite_us.md, glossary terms, and two citation-card pages. Readers on the rest of the site still met plain-text citations, split reference lists, raw URLs inside popovers with no open-access indicator, and unstyled "How to cite" blocks without copy buttons.
This PR audits all non-generated pages on rebrand-doors, redesigns the citation popover into a lighter APA card with build-time OpenAlex/Unpaywall open-access enrichment (showing OA status and direct free-to-read links when a DOI is paywalled), hardens citation infrastructure for widget_page sections and page-local APA reference lists, and rolls out popovers, unified hanging-indent reference lists, and standardized citation cards across 12 hand-written pages.
Fixes #200
What changed
Citation popover redesign & build-time Open Access enrichment
- Compact APA + action-bar popover (
assets/js/doors/citations.js,assets/js/doors/popover.js,assets/css/doors/popover.css):- Quiet header row with an unlocked/locked padlock icon + OA status (
Open access,Free copy · <Repository>,Paywalled, orReferencewhen no DOI) and an aligned×close button (44 px tap area). - Verbatim APA reference body with trailing raw
https://doi.org/.../Available at:URL clutter stripped from display whileCopy referencealways copies the complete reference including its DOI/URL. --surfacefooter bar pairing clean action links (Read free PDF ↗/Read free copy ↗+DOI ↗for Green OA,Read article ↗for direct OA,Publisher DOI ↗for paywalled,Open source ↗for non-DOI URLs) with an outlinedCopy referencebutton and animated checkmark feedback.- Popovers reserve space for
.site-head(when in view) and visible.cc-windowcookie banners, clamptopandmaxHeighttogether, and sit atz-index: 950(above the collapsed Just-OS launcher at900; below header at1000and open chat at10000).
- Quiet header row with an unlocked/locked padlock icon + OA status (
- Build-time OpenAlex + Unpaywall OA enrichment (
scripts/enrich_citation_oa.py,data/citation_oa.json,.github/workflows/data-processing.yml,layouts/partials/citations/metadata.html,layouts/partials/citations/entry.html,scripts/rebrand/check_source_rules.py):- Batched OpenAlex Works API lookup (40 DOIs/request, Unpaywall fallback for misses, 90-day cache) covering both
content/glossary/apa_lookup.jsonand{{< local-references >}}DOIs — 429 / 431 DOIs enriched (208 direct OA, 78 paywalled papers with Green OA free copies, 143 paywalled). - Runs in
data-processing.yml(offline/deterministic Hugo builds; zero runtime third-party API requests from browsers).
- Batched OpenAlex Works API lookup (40 DOIs/request, Unpaywall fallback for misses, 90-day cache) covering both
Shortcodes, author lists, checks & generator fixes
{{< cite >}}(layouts/shortcodes/cite.html): Added optionaltext="..."parameter to preserve each author's exact visible wording and punctuation while linking to#ref-<key>.{{< local-references >}}(layouts/shortcodes/local-references.html): New paired shortcode for pages with manual APA reference lists not inapa_lookup.json. Merges any{{< cite >}}entries from.Page.Storealphabetically into one<ul class="references-list" data-local-references="true">with author-collapse toggles andlocal-<md5>keys.- Page-local auto-linking (
assets/js/doors/citations.js,assets/js/doors/citation-matches.js): Runs conservative author-year matching on.article-stylewhen[data-local-references]is present (skipping links, headings, code, summaries, reference lists, citation cards, and glossary layouts), including optionalp./pp.page locators on both parenthetical and narrative citations. - Author-list display (
layouts/partials/citations/authors.html,layouts/shortcodes/citation-card.html,layouts/shortcodes/cite-us.html,assets/css/doors/citations.css): Suggested citations ({{< citation-card >}}and{{< cite-us >}}) now show up to 10 authors in full before collapsing (reference lists keep 5), and.ref-authors-toggleis styled as a plain inline underlined link instead of a floating bordered pill. - APA metadata & bibliography generator (
layouts/partials/citations/metadata.html,bibtex_to_apa/bibtex_to_apa.js): Extended date regex for APA 7 full dates like(2021a, July 12)and hardened URL/DOI extraction for parenthetical DOIs (10.1002/(SICI)...); fixedbibtex_to_apa.jsto normalise, & et al.→, et al.(Klein2014) and^Forrt.→FORRT.(FORRT2019) on the nextdata-processing.ymlrun. - Reference list formatting & card CSS deduplication (
assets/css/doors/citations.css,layouts/shortcodes/citation-card.html): Styled non-glossary.article-layout .article-style ul.references-listwith clean APA hanging indents (1.5em) andoverflow-wrap: anywhere; deduplicatedcite_us.css<link>per page via.Page.Store. - Checks & docs (
scripts/check_seo_html.py,scripts/tests/,CONTRIBUTING.md): Extended Check 15 to verify everya.cite[data-cite]resolves to a matching[data-reference]entry and fail on truncateddata-sourceDOIs/URLs (both unbalanced parentheses and balanced-prefix truncation); added unit tests (test_enrich_citation_oa.py,test_citation_matches.py,test_check_seo_html.py).
Content rollout (12 non-generated pages)
- Shared bibliography citations (
{{< cite >}}+{{< references >}}):content/manuscript/manuscript.md(widget_page): 4 exact citations inside{{< expand >}}(Vazire2018,Nosek2012Bar_Anan,Nosek2012b,FORRT2019) +{{< references >}}.content/reversals/reversals.md(widget_page): 24 verified citations across 7 exact DOI-matched papers (Klein2014×12,EbersoleEtAl2016×5,Clark2019×2,Simonsohn2014effect×2,Kerr2018×1,Mellers2001×1,Klein2018ManyLabs2×1) +{{< references >}}+ standardized{{< citation-card >}}under How to cite.content/educators-corner/011-intersectionality-open-science/index.md: 2 remaining citations (HenrichHeineNorenzayan2010,BahlaiEtAl2019) preserving exact visible text.
- Page-local APA reference lists (
{{< local-references >}}):content/educators-corner/010-Neurodiversity/index.md: Unified split{{< references >}}+### Other references(31 raw paragraphs) into one alphabetical## Referenceslist (34 entries, 32 live popovers, 12 author toggles,Referenceslink in TOC).content/educators-corner/018-accessible-feedback-in-research/index.md: Wrapped 8 manual references (7 live popovers).content/educators-corner/016-reviewer-zero/index.md: Wrapped 5 manual references (all 5 live popovers) and removed 2 broken Zotero Google Docs draft links.content/dei/2-intro-text.md(widget_page): Wrapped 4 manual references (all 5 in-text citations live, linkingHenrich, Heine & Norenzayan, 2010to the Nature 2010 entry listed on that page).
- Standardized
{{< citation-card >}}blocks:content/pedagogies/001-Julia-Strand/index.md,002-Gilad-Feldman/index.md,003-CREP/index.md,004-Thomas-Rhys-Evans/index.md(all 6 authors on004shown in full under the 10-author suggested-citation limit).content/neurodiversity/neurodiversity.md(bothBibliographic Referencespoilers, with inlineShow all 14 authorslink on the 14-author entry).
Before & After
manuscript — Green OA popover (Free copy · OSF + DOI, 1440 px & 390 px)
| Before (1440 px) | After (1440 px) | After (390 px) |
|---|---|---|
![]() | ![]() | ![]() |
reversals — Direct Open Access popover + inline author link (1440 px & 390 px)
| Before (1440 px) | After (1440 px) | After (390 px) |
|---|---|---|
![]() | ![]() | ![]() |
Paywalled DOI (ec011) & Non-DOI local reference (ec018, 1440 px & 390 px)
Paywalled DOI (ec011, 1440 px) | Non-DOI source (ec018, 1440 px) | Non-DOI source (ec018, 390 px) |
|---|---|---|
![]() | ![]() | ![]() |
Unified hanging-indent references (ec010 & ec004) and full-author citation card (ped004)
ec010 Before (1440 px) | ec010 After (1440 px) |
|---|---|
![]() | ![]() |
ped004 Before (1440 px) | ped004 After (1440 px) |
|---|---|
![]() | ![]() |
ec004 Before (1440 px) | ec004 After (1440 px) |
|---|---|
![]() | ![]() |
Decisions to review
- Reversals
How to citewording & DOI links (content/reversals/reversals.md): "Please cite this source as Hartmann H…" was split into"Please cite this source as:", the{{< citation-card >}}, and"Contributors are listed…"as its own paragraph. Also, the 24 converted citations now open citation popovers alongside direct blue DOI links for non-bibliography studies on the same lines. - Unwrapped broken Zotero draft links (
content/educators-corner/016-reviewer-zero/index.md): Removed two brokenhttps://www.zotero.org/google-docs/?...links around(Silbiger & Stubler, 2019)and(Hamedani & Markus, 2019)(visible text unchanged) so they link to the page's References popovers instead. - Inferred matches on
ec011(content/educators-corner/011-intersectionality-open-science/index.md):HenrichHeineNorenzayan2010(BBS WEIRD paper) andBahlaiEtAl2019were matched from context since011has no existing reference list — please confirm. - Deliberately skipped pages:
content/neurodiversity-lessonbank/(deferred to avoid PR #1294 conflicts),content/educators-corner/022-repro-metrics-forrt-irise/index.md(Vancouver numeric style), and all verified false-positive same-author-year traps. - Upstream bibliography quirks: Hardened
bibtex_to_apa/bibtex_to_apa.jssoFORRT2019(Forrt.) andKlein2014(, & et al.) normalise automatically on the nextdata-processing.ymlrun;apa_lookup.jsonitself is not hand-edited here perAGENTS.md.
Checks
hugo --gc --minify(0 errors, 0 new warnings) &node --check bibtex_to_apa/bibtex_to_apa.jspython3 -m unittest scripts/tests/test_citation_matches.py scripts/tests/test_check_seo_html.py scripts/tests/test_enrich_citation_oa.py(58 tests OK) andpython3 -m unittest discover -s scripts -p 'test_parse_disciplines_gdoc.py'(11 tests OK)python3 scripts/rebrand/check_source_rules.py --base origin/rebrand-doors(0 hard-coded URLs, 0 generated files changed)python3 scripts/check_seo_html.py(all 28 checks PASS across 3,425 pages)python3 scripts/rebrand/compare_builds.py(0 removed paths, 0 added addresses, 0 structured-data drops, 0 SEO tag changes)axe-coreaudit on the redesigned Option B citation popover + modified pages (0 WCAG A/AA violations)- Playwright E2E suite at 1440 px & 390 px (Green OA, Open access, Paywalled, non-DOI Reference states; Copy reference preserves full DOI on clipboard while raw URL is hidden from display; inline author toggle; 10-author suggested citations; glossary regression check; 0 console/page errors)
Created with Gemini 4 Neon in Antigravity (reviewed with Claude Opus 5.5).














