I’m try to use strapi to build cms.
it can output json data form localhost link.
but I don’t know how to use that json data.
I tried use config.toml to config datasource like this
[[dataSources]]
source = "http://localhost:1337/posts"
contentPath = "posts"
[dataSources.mapping]
Title = "title"
Date = "published_at"
"Params.categories" = "category.title"
and json data is
[{
"id": 1,
"title": "title test",
"content": "111111111111111111111",
"published_at": "2021-08-30T09:23:41.000Z",
"created_at": "2021-08-29T13:31:28.000Z",
"updated_at": "2021-08-30T09:23:41.000Z",
"category": {
"id": 1,
"title": "logs",
"published_at": "2021-08-29T13:30:37.000Z",
"created_at": "2021-08-29T13:30:33.000Z",
"updated_at": "2021-08-29T13:30:37.000Z"
}
}, {
"id": 2,
"title": "Strapi - Open source Node.js Headless CMS",
"content": "111111111111111111111113333",
"published_at": "2021-08-30T09:24:07.000Z",
"created_at": "2021-08-30T09:24:06.000Z",
"updated_at": "2021-08-30T09:24:13.000Z",
"category": {}
}]
but it doesn’t work with default template.