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 date updated, as an ISO 8601 string.
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 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.
- date_updated_iso#
The date updated, as an ISO 8601 string.
- 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.
- 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.