Files
plainleaf/docs/Object/document.md
T

24 lines
706 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
references:
- plugs/index/document.ts
- server-common/src/types.rs
---
Every non-page file in your space (images, PDFs, attachments, etc.) is available via the `document` tag, they’re indexed purely from filesystem metadata.
The `document` tag exposes the following attributes:
| Attribute | Description |
|---|---|
| `name` | Full path of the document (also used as `ref`) |
| `contentType` | MIME type of the document |
| `size` | File size in bytes |
| `extension` | File extension (without the leading dot) |
| `created` | Creation timestamp (string) |
| `lastModified` | Last-modified timestamp (string) |
| `perm` | `ro` or `rw` |
Example query:
${query[[from index.documents() limit 3]]}