From 0a50f9850cb3b1764c5028e4271b0693eb26c99e Mon Sep 17 00:00:00 2001 From: dswbx Date: Tue, 28 Oct 2025 10:44:22 +0100 Subject: [PATCH] docs: add timestamps plugin description --- .../(documentation)/extending/plugins.mdx | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/(documentation)/extending/plugins.mdx b/docs/content/docs/(documentation)/extending/plugins.mdx index 1ab0fa1..850629d 100644 --- a/docs/content/docs/(documentation)/extending/plugins.mdx +++ b/docs/content/docs/(documentation)/extending/plugins.mdx @@ -239,7 +239,25 @@ Now you can add query parameters for the transformations, e.g. `?width=1000&heig }} /> - - +### `timestamps` + +A plugin that adds `created_at` and `updated_at` fields to the specified entities. + +```typescript title="bknd.config.ts" +import { timestamps } from "bknd/plugins"; + +export default { + options: { + plugins: [ + timestamps({ + // the entities to add timestamps to + entities: ["pages"], + // whether to set the `updated_at` field on create, defaults to true + setUpdatedOnCreate: true, + }) + ], + }, +} satisfies BkndConfig; +```