feat: Ajout d'une configuration avec les brouillons
This commit is contained in:
parent
abdf3900af
commit
b632f0f7a1
|
@ -1,13 +1,15 @@
|
||||||
import DirectusToMarkdown from '@resilien/directus-to-markdown'
|
import DirectusToMarkdown from '@resilien/directus-to-markdown'
|
||||||
import urlslug from 'url-slug'
|
import urlslug from 'url-slug'
|
||||||
|
|
||||||
|
const filter = process.env.DRAFT && process.env.DRAFT == 'true' ? '' : { draft: { _eq: 'false' } }
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
contentKey: 'body',
|
contentKey: 'body',
|
||||||
collections: {
|
collections: {
|
||||||
actualites: {
|
actualites: {
|
||||||
readManyOption: {
|
readManyOption: {
|
||||||
fields: ['title', 'slug', 'date', 'image', 'image_credit', 'draft', 'body'],
|
fields: ['title', 'slug', 'date', 'image', 'image_credit', 'draft', 'body'],
|
||||||
filter: { draft: { _eq: 'false' } }
|
filter
|
||||||
},
|
},
|
||||||
pathBuilder: (article) => {
|
pathBuilder: (article) => {
|
||||||
if (article.slug) {
|
if (article.slug) {
|
||||||
|
|
Loading…
Reference in New Issue