From 1666686444564b1aa27ea58b584971bff7233a48 Mon Sep 17 00:00:00 2001 From: Gunnar Carlson Date: Wed, 16 Oct 2024 13:49:14 -0500 Subject: [PATCH 1/2] Add slug to migration template --- src/tasks/templates/migration-file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/templates/migration-file.js b/src/tasks/templates/migration-file.js index 44b2cdf0..94304a9d 100644 --- a/src/tasks/templates/migration-file.js +++ b/src/tasks/templates/migration-file.js @@ -1,4 +1,4 @@ -export default `export default function (block) { +export default `export default function (block, slug) { // Example to change a string to boolean // block.{{ fieldname }} = !!(block.{{ fieldname }}) From 0ac86a0e05c94b7580d6d8be9a61bce83a314444 Mon Sep 17 00:00:00 2001 From: Gunnar Carlson Date: Wed, 16 Oct 2024 13:51:11 -0500 Subject: [PATCH 2/2] chore: update redme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ab72488..69362518 100644 --- a/README.md +++ b/README.md @@ -473,7 +473,7 @@ The created file will have the following content: ```js // here, 'subtitle' is the name of the field defined when you execute the generate command -module.exports = function (block) { +module.exports = function (block, slug) { // Example to change a string to boolean // block.subtitle = !!(block.subtitle)