gilbert.collection module

class gilbert.collection.Collection(site, default_type=<class 'gilbert.content.Content'>, loaders=None)

Bases: object

Collection of content objects.

items() Iterator[tuple[str, Content]]

Iterates all the items in this Collection.

load(path: Path, root: Path | None = None)

Recursively load all objects from a path.

load_file(path: Path, name: str) Content
matching(query: Query | dict | AstNode | int | float | str) Sequence[Content]

Return objects matching a query

gilbert.collection.load_raw(path: Path) tuple[None | ByteString | str, dict]

For anything we don’t recognise, we load it as a Raw data.