Skip to content

Show the official ORCID iD icon next to ORCID links#142

Merged
RichardLitt merged 1 commit into
mainfrom
orcid-id-icons
Jun 3, 2026
Merged

Show the official ORCID iD icon next to ORCID links#142
RichardLitt merged 1 commit into
mainfrom
orcid-id-icons

Conversation

@RichardLitt
Copy link
Copy Markdown
Member

Builds on top of #141.

What this changes

Right now, an ORCID on an author's page or in a pattern's contributor list shows up as the word "ORCID" or the bare ORCID number. This PR adds the official ORCID iD icon (the small green roundel you see on ORCID's own site and on most academic profile pages) next to those numbers. It's a small visual change — purely cosmetic — but it makes ORCIDs instantly recognisable as ORCIDs at a glance.

Where you'll see it

  • On each author's page — next to "ORCID:", you'll now see the green icon followed by the ORCID number, all of it clickable.
  • In the contributors section at the bottom of a pattern — each author entry's ORCID link now shows the icon next to the number instead of the word "ORCID".

What to click on the preview site

  • /authors/ciara-flanagan/ — Ciara's page; the ORCID line at the top has the icon now.
  • /embed-wellbeing-into-student-hackathons/ — scroll to Contributors; each contributor's ORCID is shown with the icon.

What this doesn't change

  • No changes to contributor workflow. You still add yourself the same way.
  • No changes to which authors have ORCIDs displayed; authors without an ORCID in authors.yml continue to show no ORCID line, same as before.
  • The icon comes from ORCID's own brand guidelines page, used in line with their published guidance.

Stacking

This PR is stacked on top of #141 — please merge that one first. Once #141 is in, this one rebases automatically onto main.

🤖 Generated with Claude Code

Add the official ORCID iD SVG (green roundel from ORCID's brand
guidelines, https://info.orcid.org/brand-guidelines/) at
assets/orcid-id.svg and update the authors hook to render it next
to ORCID identifiers wherever they appear.

Hook changes (.config/hooks/authors.py):
- New _orcid_markdown(orcid, asset_prefix) helper renders
  [![ORCID iD icon]({prefix}assets/orcid-id.svg) <orcid>](https://orcid.org/<orcid>)
  so mkdocs rewrites the relative asset path correctly for both
  source roots.
- _render_author_page uses asset_prefix="../" since author pages
  are generated under authors/<slug>.md.
- _render_pattern_bullets uses asset_prefix="" since pattern
  pages live at the docs root.

The SVG declares intrinsic width/height of 16px so the icon
renders at a sensible inline size without requiring attr_list or
extra CSS.

Verified with `mkdocs build --strict`: clean build, icon copied
to /assets/orcid-id.svg in the site output, rendered HTML on
both author pages and pattern-page chips contains the expected
<img alt="ORCID iD icon" ...> inside the ORCID anchor.
@RichardLitt RichardLitt changed the base branch from authors-as-pages-issue-89 to main June 3, 2026 01:16
@RichardLitt RichardLitt merged commit 78eb142 into main Jun 3, 2026
1 of 2 checks passed
@RichardLitt RichardLitt deleted the orcid-id-icons branch June 3, 2026 01:17
RichardLitt added a commit that referenced this pull request Jun 3, 2026
The feed lists each pattern by first-publication date and credits every
author with a clickable link to their ORCID profile. Subscribers can
find it via the Material-emitted autodiscovery <link> tag, the new
"Stay in the loop" section on the home README, or the subscribe line
on every author page.

How it works:

- mkdocs-rss-plugin (pinned in .config/requirements.txt) generates the
  feed; filenames are left at the plugin defaults so Material's hard-
  coded autodiscovery URLs resolve correctly.
- .config/hooks/authors.py enriches each pattern's page metadata so the
  plugin sees real author names and an ORCID-linked attribution body.
  After build, the same hook post-processes the generated XML for spec
  compliance: <author> → <dc:creator>, item-level <description> wrapped
  in CDATA so the ORCID anchor tags render in feed readers, the self-
  referencing <source> element dropped, and unescaped categories
  (e.g. "Education & Skills") re-escaped to keep the feed well-formed.
- authors.yml entries are now validated at build time. Slugs, names,
  affiliations, and ORCIDs must match strict regexes; any HTML-tag
  character in a name or affiliation fails the build. This closes a
  stored-XSS hole that would otherwise let a malicious PR inject script
  via author metadata.

Follow-ups to file as separate GitHub issues:

1. Broader feed coverage — per-tag feeds, an Atom variant, and a JSON
   Feed mirror so modern readers (NetNewsWire, Feedbin) have a
   first-class option.

2. Scholarly identifiers — DOIs per pattern via Zenodo, ROR IDs for
   affiliations, and surfacing both in the feed metadata so scholarly
   graph crawlers (OpenAlex, CrossRef) can ingest the catalogue.

3. Tests + UX iteration — unit tests for the authors hook (the
   pre-merge review surfaced concrete failure cases worth pinning),
   an RSS icon for the subscribe affordance, consistent wording across
   the three subscribe surfaces, and revisiting the per-author
   placement which currently sits below the patterns list.

Stacked on top of #141 (author pages) and #142 (ORCID iD icon).
RichardLitt added a commit that referenced this pull request Jun 3, 2026
The feed lists each pattern by first-publication date and credits every
author with a clickable link to their ORCID profile. Subscribers can
find it via the Material-emitted autodiscovery <link> tag, the new
"Stay in the loop" section on the home README, or the subscribe line
on every author page.

How it works:

- mkdocs-rss-plugin (pinned in .config/requirements.txt) generates the
  feed; filenames are left at the plugin defaults so Material's hard-
  coded autodiscovery URLs resolve correctly.
- .config/hooks/authors.py enriches each pattern's page metadata so the
  plugin sees real author names and an ORCID-linked attribution body.
  After build, the same hook post-processes the generated XML for spec
  compliance: <author> → <dc:creator>, item-level <description> wrapped
  in CDATA so the ORCID anchor tags render in feed readers, the self-
  referencing <source> element dropped, and unescaped categories
  (e.g. "Education & Skills") re-escaped to keep the feed well-formed.
- authors.yml entries are now validated at build time. Slugs, names,
  affiliations, and ORCIDs must match strict regexes; any HTML-tag
  character in a name or affiliation fails the build. This closes a
  stored-XSS hole that would otherwise let a malicious PR inject script
  via author metadata.

Follow-ups to file as separate GitHub issues:

1. Broader feed coverage — per-tag feeds, an Atom variant, and a JSON
   Feed mirror so modern readers (NetNewsWire, Feedbin) have a
   first-class option.

2. Scholarly identifiers — DOIs per pattern via Zenodo, ROR IDs for
   affiliations, and surfacing both in the feed metadata so scholarly
   graph crawlers (OpenAlex, CrossRef) can ingest the catalogue.

3. Tests + UX iteration — unit tests for the authors hook (the
   pre-merge review surfaced concrete failure cases worth pinning),
   an RSS icon for the subscribe affordance, consistent wording across
   the three subscribe surfaces, and revisiting the per-author
   placement which currently sits below the patterns list.

Stacked on top of #141 (author pages) and #142 (ORCID iD icon).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant