Skip to content

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

Open
RichardLitt wants to merge 1 commit into
authors-as-pages-issue-89from
orcid-id-icons
Open

Show the official ORCID iD icon next to ORCID links#142
RichardLitt wants to merge 1 commit into
authors-as-pages-issue-89from
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.
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