documenteer.citations#
documenteer.citations Module#
Composition of bibliographic citations for Documenteer-built sites.
Documenteer renders citations in several places — a technote’s “Citing this
document” section and BibTeX copy control, a user guide’s citation card and
footer — and every one of them composes the same bibliographic record. This
module is the single implementation those surfaces share: a Citation value
object with to_plain_text and to_bibtex composers, the
identifier normalizers that give every DOI, ORCID, and ROR in Documenteer the
same spelling, and the schema.org JSON-LD composers that make a guide — and,
for a site that registers a page per work, each of those pages — a
machine-readable DOI landing page.
Composition is local and deterministic. Nothing here touches the network, so the same metadata always yields byte-identical output during a Sphinx build.
Functions#
|
Compose one citation as the Highwire |
|
Compose a site's citations as a schema.org JSON-LD document, serialized ready to embed in a |
|
Compose the citations that claim one page as that page's own schema.org JSON-LD document, serialized ready to embed in a |
|
Name one citation in a build warning, so that a reader can tell which of a site's entries it is about. |
|
Express a DOI as a resolvable |
|
Validate a BibTeX citation key, returning it stripped of surrounding whitespace. |
|
Normalize a citation's landing-page URL, rejecting one that could not be linked. |
|
Normalize a DOI into its bare form, |
|
Reduce an ORCID URL to its bare identifier. |
|
Express an ORCID as a resolvable |
|
Locate a page-claiming citation on the page it claims: the page's URL with that citation's own fragment appended. |
|
Express a ROR identifier as a resolvable |
Classes#
|
The BibTeX entry type to compose a citation as. |
|
A bibliographic citation for a work, composable as plain text or BibTeX. |
|
The kind of work a citation describes. |
|
A citation a user guide displays, together with how the guide presents it. |
|
An organization credited as an author of a cited work. |
|
A publication date stated to the precision its source knows. |
|
A person credited as an author of a cited work. |
Class Inheritance Diagram#
