Skip to content

Render Markdown in glossary term titles and related terms - #1085

Merged
LukasWallrich merged 7 commits into
rebrand-doorsfrom
glossary-title-markdown
Nov 9, 2026
Merged

LukasWallrich merged 7 commits into
rebrand-doorsfrom
glossary-title-markdown

Conversation

@LukasWallrich

@LukasWallrich LukasWallrich commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Glossary term titles and related terms now render their inline Markdown. This is content-review item clusters-glossary-31, alternative 2.

What changes

  • layouts/partials/doors/term_title.html escapes the title and runs it through markdownify before the <bdi> wrap. The A–Z side card, the breadcrumb and the <h1> now show "Research Contribution Metric (p)" with an italic p, not (*p*). Slugs and en_title matching are unchanged.
  • layouts/partials/functions/resource_metadata.html gives glossary pages a plain-text title (markdownify | plainify) for <title>, og:title and JSON-LD. Those now read "Research Contribution Metric (p) | FORRT".
  • layouts/glossary/single.html, related terms:
    • * and \ are stripped before the slug is built.
    • The link text is rendered with markdownify.
    • The committed content on this branch still has *P*\-hacking and *P*\-value fishing. They now link to /glossary/english/p_hacking/ and show an italic P; before, they showed the raw text with no link.
  • scripts/check_seo_html.py: new hard check 18 fails (numbered 18 because Render italics and small caps in publication titles on cluster pages #1083 adds a 17) if a glossary page's <title> or <h1> shows paired asterisks. A lone asterisk passes, as in "G*Power". Unit tests are added. With the old title partial the check fails on glossary/english/research_contribution_metric__p_/.

Launch step: restore the italic p in related terms

On 8 November, ten Related_terms cells in the Glossary sheet (tab glossaries) were changed to plain text, because main shows the asterisks as typed and the asterisks break the link slug. Once this branch is live, the italics can go back. Use lowercase, with no backslash:

Cell Plain now Restore to
G19 p-value *p*-value
G92, G158, G196, G218, G247 p-hacking *p*-hacking
G161 p-hacking; p-value *p*-hacking; *p*-value
G195 p-hacking; p-value fishing; … Reverse p-hacking *p*-hacking; *p*-value fishing; … Reverse *p*-hacking
G239, G253 p-value *p*-value

Term titles stay plain ("p-value", "p-hacking"), because an asterisk in a title changes its slug (_p_value).

Not changed

Checks: hugo --gc --minify builds. scripts/check_seo_html.py passes all checks, including the new check 18. The unit tests pass (130). I looked at the built term pages and the A–Z list.

🤖 Generated with Claude Code

Term titles in the A–Z list, breadcrumb and heading now go through
markdownify, so 'Research Contribution Metric (*p*)' shows an italic p.
The page <title>, og:title and JSON-LD get the plain-text form.
Related terms drop '*' and '\' before building the link slug and render
their Markdown, so '*P*\-hacking' links to p-hacking and shows italic.
check_seo_html.py gains check 17, which fails if a glossary page's
<title> or <h1> shows paired asterisks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukasWallrich
LukasWallrich requested a review from a team as a code owner November 9, 2026 17:56
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Image files/references in png/jpg format detected

Note that we generally rely on webp format for this webpage, so please consider converting these images to WebP format and updating references accordingly.

References to image files:

  • scripts/rebrand/allowed_changes.txt: post/*/featured_hu.jpg
  • scripts/rebrand/allowed_changes.txt: post/*/featured_hu.png
  • scripts/rebrand/allowed_changes.txt: ai-metascience/featured_hu.png

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 9 changed file(s)! 🎉

… title check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check_seo_html.py Resolved
Comment thread layouts/glossary/single.html Resolved
…n check 18

A shared functions/plain_title partial now feeds <title>, og:title, the
DefinedTerm name and collection ListItem names, so none of them shows
'(*p*)'. Check 18 no longer treats asterisks inside words
('G*Power and P*Hack') as a Markdown pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check_seo_html.py Resolved
LukasWallrich and others added 2 commits November 9, 2026 18:06
plain_title now takes the text to clean, so the breadcrumb and ListItem
names keep .LinkTitle while <title> and the DefinedTerm name use .Title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pages

compare_builds.py flags any SEO tag change. These five pages' <title>,
og:title and JSON-LD name now read '(p)' instead of '(*p*)', which is the
intended effect of rendering glossary title Markdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukasWallrich

Copy link
Copy Markdown
Contributor Author

Note

🤖 Claude Opus 5.5 responding on behalf of Lukas Wallrich

No change needed for the image warning. The three references are existing lines in scripts/rebrand/allowed_changes.txt, which this PR touched elsewhere. They name old generated featured_hu.jpg/.png copies that the redesign is allowed to drop. They are not image references. The check-images job passes.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread scripts/rebrand/allowed_changes.txt Resolved
CI builds with main's data artifact (slug without 'p_'); a local build from
the content committed on this branch still produces 'p_مقياس…'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le-markdown

# Conflicts:
#	scripts/check_seo_html.py
@LukasWallrich
LukasWallrich merged commit b54e175 into rebrand-doors Nov 9, 2026
6 checks passed
@LukasWallrich
LukasWallrich deleted the glossary-title-markdown branch November 9, 2026 20:16
LukasWallrich added a commit that referenced this pull request Nov 9, 2026
#1085 took check 18 for glossary titles, so the cluster-title check is now
check 19, in both the docstring and the summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LukasWallrich

Copy link
Copy Markdown
Contributor Author

Note

🤖 Claude Opus 5.5 responding on behalf of Lukas Wallrich

@richarddushime, this has already been merged into rebrand-doors. Could you still give a post-merge review of its template code? Lukas chose to render Markdown in glossary term titles, for example the italic p in "Research Contribution Metric (p)". To do that, the PR changes these shared partials:

  1. htmlEscape | markdownify before safeHTML in layouts/partials/doors/term_title.html and for related terms in layouts/glossary/single.html. Escaping first should mean only Markdown, not raw HTML from the sheet, can produce tags. Is that enough? Would you prefer .RenderString or an inline-only option, so that a title starting with 1. or # can't become a list or heading?
  2. layouts/partials/functions/plain_title.html, new and glossary-only. It feeds <title>, og:title, breadcrumbs and the JSON-LD names through resource_metadata.html, jsonld/main.html and structured-data/glossary-term.html. jsonld/main.html and resource_metadata.html run on every page; for non-glossary pages the text passes through unchanged. Is the per-item partial call in jsonld/main.html's collection loop acceptable for build time on large sections?
  3. Related-term slugs now drop * and \ before matching, so *P*-value links to the p_value page. Could that make two different terms match the same slug?

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