summaryrefslogtreecommitdiff
path: root/src/build/rss.mjs
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-07-05 07:34:37 +0200
committerache <ache@ache.one>2023-07-05 07:34:37 +0200
commitd8f3be76af854acb58ea6ef9521dd90424117461 (patch)
tree0d9a6dec0d610a35f153b9361280dd821f4e4034 /src/build/rss.mjs
parentFix table of contents (diff)
i18n for RSS
Diffstat (limited to 'src/build/rss.mjs')
-rw-r--r--src/build/rss.mjs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/build/rss.mjs b/src/build/rss.mjs
index 04b0393..4eec634 100644
--- a/src/build/rss.mjs
+++ b/src/build/rss.mjs
@@ -1,17 +1,23 @@
import RSS from 'rss';
+import i18n from './i18n.mjs';
-const getRSS = (articles, baseUrl) => {
+const getRSS = (articles, baseUrl, lang) => {
+ console.log(i18n[lang]['rss']['title']);
const rssFeed = new RSS({
- title: 'ache: Blog personnel',
- description: 'Programmation, Algorithmique, Système, *pick you poison*',
+ title: i18n[lang]['rss']['title'],
+ description: i18n[lang]['rss']['description'],
// eslint-disable-next-line camelcase
+ custom_namespaces: {
+ 'visible_description': i18n[lang]['rss']['description']
+ },
+ site_url: "https://ache.one",
feed_url: `${baseUrl}rss.xml`,
canonical: `${baseUrl}rss.xml`,
// eslint-disable-next-line camelcase
site_url: baseUrl,
// eslint-disable-next-line camelcase
image_url: `${baseUrl}ache.svg`,
- language: 'fr',
+ language: lang,
pubDate: (new Date().toLocaleString()),
ttl: '1440',
});