From 65d03ec753b46dfe8637199b2ee3f108a7b0e53b Mon Sep 17 00:00:00 2001 From: Jeff Dairiki Date: Sun, 27 Feb 2022 14:07:51 -0800 Subject: [PATCH] Add minimal docs for Asset class (to fix broken link to same) --- content/docs/api/db/asset/children/contents.lr | 11 +++++++++++ content/docs/api/db/asset/contents.lr | 14 ++++++++++++++ content/docs/api/db/asset/get-child/contents.lr | 13 +++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 content/docs/api/db/asset/children/contents.lr create mode 100644 content/docs/api/db/asset/contents.lr create mode 100644 content/docs/api/db/asset/get-child/contents.lr diff --git a/content/docs/api/db/asset/children/contents.lr b/content/docs/api/db/asset/children/contents.lr new file mode 100644 index 00000000..f958e346 --- /dev/null +++ b/content/docs/api/db/asset/children/contents.lr @@ -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. diff --git a/content/docs/api/db/asset/contents.lr b/content/docs/api/db/asset/contents.lr new file mode 100644 index 00000000..789f9317 --- /dev/null +++ b/content/docs/api/db/asset/contents.lr @@ -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. diff --git a/content/docs/api/db/asset/get-child/contents.lr b/content/docs/api/db/asset/get-child/contents.lr new file mode 100644 index 00000000..6bb1e31d --- /dev/null +++ b/content/docs/api/db/asset/get-child/contents.lr @@ -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