liara.publish

Module Contents

Classes

BuildContext

Provides information about the current build.

DefaultPublisher

TemplatePublisher

API

class liara.publish.BuildContext(node: Union[liara.nodes.DocumentNode, liara.nodes.IndexNode])

Provides information about the current build.

Initialization

version: str = None

The Liara version string (i.e. a.b.c)

timestamp: datetime.datetime = None

The current time when this node was processed

property last_modified_time

Get the last modified time of the source file (if present) as a datetime instance. If there’s no source file (for example, for indices), this returns the timestamp of the build itself.

class liara.publish.DefaultPublisher(output_path: pathlib.Path, site: liara.site.Site)

Bases: liara.nodes.Publisher

publish_resource(resource: liara.nodes.ResourceNode)
publish_generated(generated: liara.nodes.GeneratedNode)
publish_static(static: liara.nodes.StaticNode)
class liara.publish.TemplatePublisher(output_path: pathlib.Path, site: liara.site.Site, template_repository: liara.template.TemplateRepository)

Bases: liara.publish.DefaultPublisher

publish_document(document)
publish_index(index: liara.nodes.IndexNode)