this is my src/index.ts in my strapi backend
async bootstrap({ strapi }: { strapi: Core.Strapi }) {
await strapi.db.query(‘api::article.article’).deleteMany({});
for (let i = 0; i < 100; i++) {
const title = faker.lorem.words({ min: 3, max: 10 });
const slug = slugify(title, { lower: true });
await strapi.service("api::article.article").create({
data: {
title,
slug, // Generate and assign slug here
date: faker.date.anytime(),
}
});
}
but I dont understand how can I create block content ? aka the body of the article
This topic has been created from a Discord post (1293715840587268138) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord