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 urlslug from 'url-slug'
|
||||
|
||||
const filter = process.env.DRAFT && process.env.DRAFT == 'true' ? '' : { draft: { _eq: 'false' } }
|
||||
|
||||
const config = {
|
||||
contentKey: 'body',
|
||||
collections: {
|
||||
actualites: {
|
||||
readManyOption: {
|
||||
fields: ['title', 'slug', 'date', 'image', 'image_credit', 'draft', 'body'],
|
||||
filter: { draft: { _eq: 'false' } }
|
||||
filter
|
||||
},
|
||||
pathBuilder: (article) => {
|
||||
if (article.slug) {
|
||||
|
|
Loading…
Reference in New Issue