Site Asset Library

The asset library holds files that belong to a site and not to one release. Register a file once, find it later, attach an exact version to a draft, or give it a URL of its own for other applications.

Register And Find

Upload a file and register its first version. The last argument before the tags is a UUID key. Save it before you run the command, in case you need to retry.

pnpm fold assets create cover.pdf "Press cover" "$(uuidgen)" --tag press

Search the whole site by text and tag. Each result has the asset's UUID, its current catalog revision and its latest file version. When there are more results, pass the returned next value as --after.

pnpm fold assets search --query cover --tag press

pnpm fold assets edit replaces an asset's title, description and tags.

Attach, Replace And Publish

pnpm fold assets attach ASSET 1 DRAFT DRAFT_REVISION press/cover.pdf
pnpm fold assets publish ASSET 1 0 KEY
pnpm fold assets status ASSET
pnpm fold assets replace ASSET CATALOG_REVISION updated-cover.pdf NEW_KEY
pnpm fold assets versions ASSET

To move the URL to version 2, publish version 2 with the generation that status reports. To withdraw the URL, run pnpm fold assets unpublish ASSET GENERATION KEY.

A publish can be accepted before it's applied. If you aren't sure of the outcome, run the same command again with the same key.

Who Can Do What

Editing the catalog and attaching to a draft need write access to the site. Publishing and unpublishing need the publisher role. A file is at most 8 MiB.

Next: Resume an existing draft