feat(Directus): Mise à jour des paramètres de Directus
This commit is contained in:
parent
4275fed4f3
commit
8d6c4b429f
|
@ -20,20 +20,20 @@ data: NsJ77R/8TEmyCM7h6OXkOeGhKAdctofukKezjfjIMGaBv5aGYN4CKYCIBlLsBWfFvMb+0SIDqr
|
||||||
# drone encrypt weko/lestoitsduval $DIRECTUS_URL
|
# drone encrypt weko/lestoitsduval $DIRECTUS_URL
|
||||||
kind: secret
|
kind: secret
|
||||||
name: DIRECTUS_URL
|
name: DIRECTUS_URL
|
||||||
data: pPaOgtpSRFhEZ6zq61OoN+gYxZ6nzg+FlmFYEhUq/GLoFXTwA3i+Yci7ZrwJUmhOpLtG
|
data: 8yxEqiZv9pFrjT9kS7kMkuG3M0ezKsWf8EVrYqc2U5MpE1iVBOwj87DXJ4UVWZ5t7INKpDmxi2Nk6mXM
|
||||||
|
|
||||||
---
|
---
|
||||||
# drone encrypt weko/lestoitsduval $DIRECTUS_EMAIL
|
# drone encrypt weko/lestoitsduval $DIRECTUS_EMAIL
|
||||||
kind: secret
|
kind: secret
|
||||||
name: DIRECTUS_EMAIL
|
name: DIRECTUS_EMAIL
|
||||||
data: Egj2gQqz40mbxx9tFc7bfTOiUc36Dch+2Y4RjVEt9qpoL1y5d5KEpSE=
|
data: L+dV9HpRrUTjv7/CI2LHPJr8X2778GoHLswMNUamNMqiAgbQGr6agdU=
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# drone encrypt weko/lestoitsduval $DIRECTUS_PASSWORD
|
# drone encrypt weko/lestoitsduval $DIRECTUS_PASSWORD
|
||||||
kind: secret
|
kind: secret
|
||||||
name: DIRECTUS_PASSWORD
|
name: DIRECTUS_PASSWORD
|
||||||
data: TC0fUdQ7NvL7Qri7SuqTK6JC9zbX0xVSyndHl/zbFlecARlc7Yzru65OO1fvf1VQxSejIVlPcyorZRiHepUeTnt0nEXTgDmO
|
data: h5KEej5axDgJgrP9CSmtoA8gyScxGU2oSInrFon5fCuzFdJYDUtJIiNSKXJspwztaOZ+VaF4aq4KoX9KYuq6Zp2rsPJlFkZc
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
|
1
.env
1
.env
|
@ -2,3 +2,4 @@ DOCKER_CONTEXT=vert.weko.resilien
|
||||||
NAME=ltdv
|
NAME=ltdv
|
||||||
URL=lestoitsduval.fr
|
URL=lestoitsduval.fr
|
||||||
STATS_CONTAINER=ltdv-stats
|
STATS_CONTAINER=ltdv-stats
|
||||||
|
DIRECTUS_URL=https://contenu.${URL}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
public
|
public
|
||||||
resources
|
resources
|
||||||
backups
|
backups
|
||||||
|
.hugo_build.lock
|
||||||
|
|
|
@ -6,7 +6,7 @@ const driverOptions = {
|
||||||
password: process.env.DIRECTUS_PASSWORD,
|
password: process.env.DIRECTUS_PASSWORD,
|
||||||
buildDrafts: false,
|
buildDrafts: false,
|
||||||
collections: {
|
collections: {
|
||||||
'lestoitsduval_actualites': {
|
'actualites': {
|
||||||
pathBuilder: (path, article, urlslug) => {
|
pathBuilder: (path, article, urlslug) => {
|
||||||
if (article.slug) {
|
if (article.slug) {
|
||||||
return `${path}/actualites/${article.slug}`
|
return `${path}/actualites/${article.slug}`
|
||||||
|
|
|
@ -90,13 +90,8 @@ class Driver {
|
||||||
if (this._isBranch(article, collection) || this._isPage(article, collection)){
|
if (this._isBranch(article, collection) || this._isPage(article, collection)){
|
||||||
return `${this.content.path}/${collection.collection}`;
|
return `${this.content.path}/${collection.collection}`;
|
||||||
}
|
}
|
||||||
// console.log(article.date)
|
|
||||||
const datePrefix = article.date_created ? `${article.date_created.split('T')[0]}_` : '';
|
|
||||||
|
|
||||||
|
|
||||||
const [year, mouth, day] = article.date.split('-')
|
const [year, mouth, day] = article.date.split('-')
|
||||||
// console.log(year)
|
|
||||||
// return `${this.content.path}/${collection.collection}/${article.id}_${datePrefix}${urlslug(article.title, { remove: /\./g })}`;
|
|
||||||
return `${this.content.path}/actualites/${year}/${mouth}/${article.date.replaceAll('-', '_')}-${urlslug(article.title, { remove: /\./g })}`;
|
return `${this.content.path}/actualites/${year}/${mouth}/${article.date.replaceAll('-', '_')}-${urlslug(article.title, { remove: /\./g })}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +113,9 @@ class Driver {
|
||||||
|
|
||||||
// Manipulate some variable property names
|
// Manipulate some variable property names
|
||||||
if (front.date_created){
|
if (front.date_created){
|
||||||
|
if (!front.date) {
|
||||||
front.date = front.date_created
|
front.date = front.date_created
|
||||||
|
}
|
||||||
delete front.date_created
|
delete front.date_created
|
||||||
}
|
}
|
||||||
if (front.date_updated){
|
if (front.date_updated){
|
||||||
|
|
Loading…
Reference in New Issue