Repository navigation
Mark bibliography entries as h-cite microformats - #257
Conversation
A render_block filter (includes/microformats.php) adds the class h-cite to each entry's <li id="ref-…"> and, right after its start tag, a hidden span of <data> elements built from the stored CSL: p-name, a p-author h-card per author, dt-published, the DOI as u-uid u-url, the URL as u-url, p-publication, and p-publisher. The visible text and save() are unchanged, so no deprecation is needed and published posts get it without re-saving. Feeds skip it and the email markup strips it. The bibliography_builder_enrich_microformats filter turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA1cnwP9mYKwaWniaFS
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #257 +/- ##
============================================
+ Coverage 89.38% 89.47% +0.08%
Complexity 67 67
============================================
Files 94 95 +1
Lines 10303 10409 +106
Branches 816 816
============================================
+ Hits 9209 9313 +104
- Misses 410 412 +2
Partials 684 684 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@codex review Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
In-text and margin citations with Update citations after a style change (#256); annotated bibliographies (#258); h-cite microformats (#257); full citation records in Yoast SEO's graph and Yoast context fix (#252, #254); RIS journal abbreviations; sentence case in Harvard; the Playground demo example of citations and annotations (#259). Claude-Session: https://claude.ai/code/session_01WPtgA1cnwP9mYKwaWniaFS Co-authored-by: Claude <noreply@anthropic.com>
As a page renders, each bibliography entry now becomes an
h-cite. IndieWeb tools (Webmention receivers, readers and other microformats parsers) can then read the bibliography as a list of citations.Each one carries:
h-card, linked to the author's ORCID iD when there is one; organizations getp-org2018,2018-05or2018-05-14, never an invented month or day)https://doi.org/…(u-uid)p-publication)The values sit in a hidden span of
<data>elements built from the stored CSL-JSON, the same source as the JSON-LD and COinS. The visible entry, and what screen readers announce, don't change. Like the other render-time enrichments,save()is untouched (includes/microformats.php, priority 11), so there's no deprecation, and published posts get the markup without being re-saved. Feeds skip it, and the email output strips it. The newbibliography_builder_enrich_microformatsfilter turns it off.This implements the "Microformats" item from SPEC.md's roadmap. The citations in #256 are already marked
h-citeand point at these entries.How it was checked
MicroformatsTest(10 tests, 34 assertions). The full PHPUnit suite (723 tests), PHPCS and Psalm pass, andverify-metrics.shis updated and passes.h-citewith the expected name, authors (including a particle, an ORCID and an organization), date, uid/url, publication and publisher. The RSS feed had no microformats markup.WP_HTML_Tag_Processorcan't insert markup and the PHPUnit bootstrap has no copy of it. CLAUDE.md notes this.npm cifails onmainbecausepackage-lock.jsonis out of step withpackage.json(eslint 10 in the lock, 9 wanted). That's not this PR's doing, but it's worth fixing.Merge order: this branch, #256 (citations) and the other new Borges PR touch the same docs (
CHANGELOG.md,SPEC.md,README.md,readme.txt) and the line counts indocs/current-metrics.md. Whichever merges later needs a rebase and a re-run ofverify-metrics.sh. No version is bumped, so merging releases nothing.Generated by Claude Code