basic metadata compatible with hugo

This commit is contained in:
Guilhem Fauré 2023-04-24 14:59:42 +02:00
parent cc07869989
commit a7ca45f731

View File

@ -9,10 +9,11 @@ class metadata:
self.title = article.titre self.title = article.titre
self.subtitle = article.soustitre # Probably unused self.subtitle = article.soustitre # Probably unused
# self.section = article.id_rubrique # TODO join # self.section = article.id_rubrique # TODO join
self.description = article.descriptif
self.caption = article.chapo # Probably unused self.caption = article.chapo # Probably unused
self.ps = article.ps # Probably unused self.ps = article.ps # Probably unused
self.publicationDate = article.date self.publicationDate = article.date
self.status = article.statut self.draft = "false" if article.statut == "publie" else "true"
# self.sector = article.id_secteur # TODO join # self.sector = article.id_secteur # TODO join
self.update = article.maj self.update = article.maj
# self.export = article.export # USELESS # self.export = article.export # USELESS
@ -40,11 +41,12 @@ class metadata:
{ {
"lang": self.lang, "lang": self.lang,
"title": self.title, "title": self.title,
"subtitle": self.subtitle, # "subtitle": self.subtitle,
"creation": self.creationDate, "date": self.creationDate,
"date": self.publicationDate, "publishDate": self.publicationDate,
"update": self.update, "lastmod": self.update,
"status": self.status, "draft": self.draft,
"description": self.description,
}, },
allow_unicode=True, allow_unicode=True,
) )