TechnoteJinjaContext#
- class technote.config.TechnoteJinjaContext(toml)#
Bases:
object
A class available to the Jinja context in HTML templates and provides access to technote.toml-based metadata.
- Parameters:
toml (
TechnoteToml
) – The metadata fromtechnote.toml
.
Attributes Summary
The technote's unformatted abstract.
The canonical URL of the technote, if available.
The date of initial publication, as an ISO 8601 string.
The date updated, as an ISO 8601 string.
A meta name=generator tag to identify the version of technote.
The URL for editing content on GitHub, from its default branch.
The branch or tag name.
branch or tag.
The GitHub repository slug,
owner/name
.The GitHub repository URL.
The Highwire metadata tags for the technote.
The OpenGraph metadata tags for the technote.
The technote's title.
The technote.toml root object.
The version, as a string if available.
Methods Summary
set_abstract
(abstract)Set the abstract metadata from the content.
set_content_title
(title)Set the title from the content nodes.
Attributes Documentation
- abstract#
The technote’s unformatted abstract.
This content is extracted from the
abstract
directive, and all markup is removed as part of that process. This attribute can be used for populating summary tags in the HTML header.
- canonical_url#
The canonical URL of the technote, if available.
- date_created_iso#
The date of initial publication, as an ISO 8601 string.
- date_updated_iso#
The date updated, as an ISO 8601 string.
- generator_tag#
A meta name=generator tag to identify the version of technote.
- github_edit_url#
The URL for editing content on GitHub, from its default branch.
- github_ref_name#
The branch or tag name.
- github_ref_type#
branch or tag.
- Type:
The ref type
- github_repo_slug#
The GitHub repository slug,
owner/name
.
- github_url#
The GitHub repository URL.
- highwire_metadata_tags#
The Highwire metadata tags for the technote.
- opengraph_metadata_tags#
The OpenGraph metadata tags for the technote.
- title#
The technote’s title.
The title is the
h1
heading from the document iftechnote.title
isn’t set intechnote.toml
.
- toml#
The technote.toml root object.
- version#
The version, as a string if available.
Methods Documentation
- set_abstract(abstract)#
Set the abstract metadata from the content.