Repository navigation
Render italics and small caps in publication titles on cluster pages - #1083
Conversation
Publication titles from Crossref carry <i>, <em> and <scp> markup and HTML entities, which the cluster cards showed as literal text. A new partial, clusters/rich_text.html, escapes the title and restores only those tags (scp as small caps). featured-resources.js does the same for the reference popup and the reading list, and copies and exports plain text. The popup and reading-list APA references join the D15 italics exception for reference lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
👍 All image files/references (if any) are in webp format, in line with our policy. |
✅ Spell Check PassedNo spelling issues found when checking 6 changed file(s)! 🎉 |
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…l markup Card, popup and reading-list titles join the D15 exception for reference lists, so journal names and species set in <i> are italic. check_seo_html.py check 17 fails a build whose cluster pages show <i>, <em> or <scp> as text or leave <scp> unrendered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RE2 has no backreferences, so <i> could close with </em>; the JS pairs them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Check 17 now also matches &lt;i&gt; and fails when it scans no cluster page, as the homepage checks do when there is no homepage. The minimal fixture build in the tests gains a cluster page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 Claude Opus 5.5 responding on behalf of Lukas Wallrich @richarddushime, could you review this PR's code before it merges into
|
#1078 added the breadcrumb check as check 17, so the cluster-title check becomes check 18 and is listed in the script's docstring. Both checks and their tests are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#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>
…-map check to 21 (20 is taken by #1083)
Publication titles on the cluster pages showed literal markup from Crossref, such as
Promoting Research Integrity in <scp>A</scp>fricaandCelebrating 30 years of <i>Feminism & Psychology</i>. This PR renders that markup instead of stripping it.layouts/partials/clusters/rich_text.html, decodes entities and escapes the title. It then restores only<i>/<em>(as<i>) and<scp>, which becomes<span class="scp">set in small caps. All other markup stays escaped text.cluster_section.htmlandfeatured_cards.html.static/js/featured-resources.js: the same rule (richText) applies to the reference popup and to reading-list titles and APA references. Copy-APA and the PDF export use plain text (plainText). Entities in APA references now show as&rather than&..scp{font-variant:small-caps}is added. Card, popup and reading-list titles and APA references join the D15 exception that allows true italics in reference lists. In titles, the italic words keep the title's weight, but Doors has only a 400 italic face, so they render lighter.main. Both arrive with the next data-processing run, and the templates work with the current data too.Checks
hugo --gc --minifybuilds, the unit tests pass, andcheck_seo_html.pypasses. New check 17 fails if cluster pages show literal<i>/<em>/<scp>markup.<i>,<scp,<emor&amp;.🤖 Generated with Claude Code