From 63f0ab5e20c5f1afc473de78c093967b9dd47478 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Fri, 17 Jan 2025 12:12:43 +0000 Subject: [PATCH] Docs: add comment with source to all auto-generated pages --- docs/build.mjs | 2 +- docs/src/content/docs/api-channel.md | 1 + docs/src/content/docs/api-colour.md | 1 + docs/src/content/docs/api-composite.md | 1 + docs/src/content/docs/api-constructor.md | 1 + docs/src/content/docs/api-input.md | 1 + docs/src/content/docs/api-operation.md | 1 + docs/src/content/docs/api-output.md | 1 + docs/src/content/docs/api-resize.md | 1 + docs/src/content/docs/api-utility.md | 1 + 10 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/build.mjs b/docs/build.mjs index 15f6dca3..de4d8b71 100644 --- a/docs/build.mjs +++ b/docs/build.mjs @@ -31,7 +31,7 @@ Object.keys(pages).forEach(async (m) => { }); const cleanMarkdown = - `---\ntitle: ${pages[m]}\n---\n\n` + + `---\n# This file was auto-generated from JSDoc in lib/${m}.js\ntitle: ${pages[m]}\n---\n\n` + markdown .replace(/(## )([A-Za-z0-9]+)([^\n]*)/g, '$1$2\n> $2$3\n') // simplify headings .replace(/<\/a>/g, '') // remove anchors diff --git a/docs/src/content/docs/api-channel.md b/docs/src/content/docs/api-channel.md index 9c963724..2d386e8f 100644 --- a/docs/src/content/docs/api-channel.md +++ b/docs/src/content/docs/api-channel.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/channel.js title: Channel manipulation --- diff --git a/docs/src/content/docs/api-colour.md b/docs/src/content/docs/api-colour.md index 2cc50b1b..b1085ed2 100644 --- a/docs/src/content/docs/api-colour.md +++ b/docs/src/content/docs/api-colour.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/colour.js title: Colour manipulation --- diff --git a/docs/src/content/docs/api-composite.md b/docs/src/content/docs/api-composite.md index 495d9f07..ea185ba0 100644 --- a/docs/src/content/docs/api-composite.md +++ b/docs/src/content/docs/api-composite.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/composite.js title: Compositing images --- diff --git a/docs/src/content/docs/api-constructor.md b/docs/src/content/docs/api-constructor.md index fbefa314..7039db50 100644 --- a/docs/src/content/docs/api-constructor.md +++ b/docs/src/content/docs/api-constructor.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/constructor.js title: Constructor --- diff --git a/docs/src/content/docs/api-input.md b/docs/src/content/docs/api-input.md index 32a6d26f..3e1f9a7d 100644 --- a/docs/src/content/docs/api-input.md +++ b/docs/src/content/docs/api-input.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/input.js title: Input metadata --- diff --git a/docs/src/content/docs/api-operation.md b/docs/src/content/docs/api-operation.md index ec4e4553..720918c5 100644 --- a/docs/src/content/docs/api-operation.md +++ b/docs/src/content/docs/api-operation.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/operation.js title: Image operations --- diff --git a/docs/src/content/docs/api-output.md b/docs/src/content/docs/api-output.md index a26a14c5..945da137 100644 --- a/docs/src/content/docs/api-output.md +++ b/docs/src/content/docs/api-output.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/output.js title: Output options --- diff --git a/docs/src/content/docs/api-resize.md b/docs/src/content/docs/api-resize.md index dd2284f7..8a452eaa 100644 --- a/docs/src/content/docs/api-resize.md +++ b/docs/src/content/docs/api-resize.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/resize.js title: Resizing images --- diff --git a/docs/src/content/docs/api-utility.md b/docs/src/content/docs/api-utility.md index 188c2d7a..8a7ef248 100644 --- a/docs/src/content/docs/api-utility.md +++ b/docs/src/content/docs/api-utility.md @@ -1,4 +1,5 @@ --- +# This file was auto-generated from JSDoc in lib/utility.js title: Global properties ---