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 from technote.toml.

Attributes Summary

abstract

The technote's unformatted abstract.

title

The technote's title.

toml

The technote.toml root object.

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.

Return type:

str

title#

The technote’s title.

The title is the h1 heading from the document if technote.title isn’t set in technote.toml.

Return type:

str

toml#

The technote.toml root object.

Return type:

TechnoteToml

Methods Documentation

set_abstract(abstract)#

Set the abstract metadata from the content.

Parameters:

abstract (str) –

Return type:

None

set_content_title(title)#

Set the title from the content nodes.

Parameters:

title (str) –

Return type:

None