compose_highwire_tags#

documenteer.citations.compose_highwire_tags(citation, *, url=None)#

Compose one citation as the Highwire <meta> tags a page carries in its <head>, escaped and ready to emit.

Parameters:
  • citation (Mapping[str, Any]) – The citation whose landing page this page is, as the mapping GuideCitation.to_html_context composes and Sphinx’s html_context publishes.

  • url (str | None, default: None) – The page’s own absolute URL, emitted as citation_fulltext_html_url — the site’s base URL for the site’s own citation, or a claimed page’s URL. None when the site declares no base URL, in which case the tag is omitted rather than falling back to the doi.org redirect, which is not where the full text is.

Returns:

The tags, one per line, in this order: citation_title, then a citation_author per author followed by that author’s citation_author_institution and citation_author_orcid, then citation_publication_date, citation_doi, citation_publisher, citation_fulltext_html_url, and DC.identifier. Every value is escaped with html.escape; a field the citation does not state emits no tag.

Return type:

str

Notes

Highwire tags are what Google Scholar’s inclusion guidelines specify and what Zotero’s embedded-metadata translator reads, so a page that carries them gets a one-click “Save to Zotero” with the right title, creators, date, and DOI. The Dublin Core DC.identifier is emitted alongside them as the complement DataCite’s landing-page guidance asks for.

These tags are single-valued and describe the page’s landing-page subject, so exactly one citation composes them: the self entry for the site, or the single entry that claims a page (see documenteer.ext.citationpage). A page several entries claim emits none of them, because there is no one work the tags could be about.

The date is written as citation_publication_date, the spelling Google Scholar documents and the one the technote package emits since 0.11.0 (it wrote citation_date before). Scholar documents only two forms for its value — a full YYYY/MM/DD date, or a year alone — so a work dated to the year alone emits 2025 rather than an invented 2025/01/01, and a work dated to the month emits its year rather than a 2025/06 no guideline describes (see _highwire_date).