Render italics and small caps in publication titles on cluster pages
Merged
LU
2d ago+92+92+01234567890123456789-13-13-01234567890123456789
Publication titles on the cluster pages showed literal markup from Crossref, such as Promoting Research Integrity in <scp>A</scp>frica and Celebrating 30 years of <i>Feminism & Psychology</i>. This PR renders that markup instead of stripping it.
- Allow-list: a new partial,
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. - Where it applies: the recommended and compact cards in
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&.- CSS:
.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. - Data still to come: titles with run-together words in Crossref ("Let's PublishFewerPapers") were fixed in the Publications sheet. The generator side of the cleanup is in #1077, into
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.- The built cluster pages contain no
<i>,<scp,<emor&amp;. - Cluster pages were checked in Chrome:
- Cluster 3: small caps show in the card, the popup title and the APA reference.
- Cluster 4: italics show in a card title.
- Cluster 10: italics show in a popup APA reference.
š¤ Generated with Claude Code