Add minimal docs for Asset class (to fix broken link to same)

This commit is contained in:
Jeff Dairiki 2022-02-27 14:07:51 -08:00
parent 103761dd6f
commit 65d03ec753
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,11 @@
title: children
---
summary: Returns a query to the children of a page.
---
type: property
---
body:
[Assets :ref](../) that correspond to directories can have children
below them. The `children` attribute provides a convenient way to access
those. It returns an iterable of child assets.

View File

@ -0,0 +1,14 @@
title: Asset
---
summary: Static assets, copied verbatim to the output.
---
module: lektor.assets
---
type: class
---
body:
Assets are [Source Objects :ref](../obj/) that correspond to static files that
are copied verbatim from the `/assets` folder to the output directory.
Usually, there is no need to manipulate Asset objects directly.

View File

@ -0,0 +1,13 @@
title: get_child
---
body:
Lookup a child of the asset. Returns `None` if no child exists with the specified name.
Naturally, this method always returns `None` unless the asset is a directory.
---
signature: name, from_url=False
---
summary: Get child asset
---
type: method