From 6134d5010cd0e4d43be3ee05eda4ce717038d4ae Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 16 Feb 2022 16:59:04 +0100 Subject: [PATCH] add META* .env, add META* .env.dist, add META .env.template, refactor config/index.js and vue.config --- frontend/.env.dist | 8 +++++++ frontend/.env.template | 8 +++++++ frontend/public/index.html | 41 ++++++++++++++++++------------------ frontend/src/config/index.js | 19 +++++++++++++++++ frontend/vue.config.js | 23 +++++++++----------- 5 files changed, 65 insertions(+), 34 deletions(-) diff --git a/frontend/.env.dist b/frontend/.env.dist index f7bda826a..0de8c6252 100644 --- a/frontend/.env.dist +++ b/frontend/.env.dist @@ -1,3 +1,11 @@ +META_URL=http://localhost +META_TITLE_DE="Gradido – Dein Dankbarkeitskonto" +META_TITLE_EN="Gradido - Your gratitude account" +META_DESCRIPTION_DE="Dankbarkeit ist die Währung der neuen Zeit. Immer mehr Menschen entfalten ihr Potenzial und gestalten eine gute Zukunft für alle." +META_DESCRIPTION_EN="Gratitude is the currency of the new age. More and more people are unleashing their potential and shaping a good future for all." +META_KEYWORDS_DE="Grundeinkommen, Währung, Dankbarkeit, Schenk-Ökonomie, Natürliche Ökonomie des Lebens, Ökonomie, Ökologie, Potenzialentfaltung, Schenken und Danken, Kreislauf des Lebens, Geldsystem" +META_KEYWORDS_EN="Basic Income, Currency, Gratitude, Gift Economy, Natural Economy of Life, Economy, Ecology, Potential Development, Giving and Thanking, Cycle of Life, Monetary System" +META_AUTHOR="Bernd Hückstädt - Gradido-Akademie" GRAPHQL_URI=http://localhost/graphql DEFAULT_PUBLISHER_ID=2896 ADMIN_AUTH_URL=http://localhost/admin/authenticate?token={token} \ No newline at end of file diff --git a/frontend/.env.template b/frontend/.env.template index 8c9c053cc..1eef43cef 100644 --- a/frontend/.env.template +++ b/frontend/.env.template @@ -1,3 +1,11 @@ +META_URL=$META_URL +META_TITLE_DE=$META_TITLE_DE +META_TITLE_EN=$META_TITLE_EN +META_DESCRIPTION_DE=$META_DESCRIPTION_DE +META_DESCRIPTION_EN=$META_DESCRIPTION_EN +META_KEYWORDS_DE=$META_KEYWORDS_DE +META_KEYWORDS_EN=$META_KEYWORDS_EN +META_AUTHOR=$META_AUTHOR GRAPHQL_URI=$GRAPHQL_URI DEFAULT_PUBLISHER_ID=2896 ADMIN_AUTH_URL=$ADMIN_AUTH_URL \ No newline at end of file diff --git a/frontend/public/index.html b/frontend/public/index.html index ca076c334..a15b46916 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -17,20 +17,18 @@ - <%= htmlWebpackPlugin.options.title %> - - - - - - - - + + + + + + + + + - + @@ -39,16 +37,17 @@ - - - - + + + + + - - - - - + + + + + diff --git a/frontend/src/config/index.js b/frontend/src/config/index.js index 7e213e1d9..eaa1e7f3d 100644 --- a/frontend/src/config/index.js +++ b/frontend/src/config/index.js @@ -18,6 +18,25 @@ const environment = { DEFAULT_PUBLISHER_ID: process.env.DEFAULT_PUBLISHER_ID || 2896, } +// const meta = { +// META_URL: process.env.META_URL || 'http://localhost', +// META_TITLE_DE: process.env.META_TITLE_DE || 'Gradido – Dein Dankbarkeitskonto', +// META_TITLE_EN: process.env.META_TITLE_EN || 'Gradido - Your gratitude account', +// META_DESCRIPTION_DE: +// process.env.META_DESCRIPTION_DE || +// 'Dankbarkeit ist die Währung der neuen Zeit. Immer mehr Menschen entfalten ihr Potenzial und gestalten eine gute Zukunft für alle.', +// META_DESCRIPTION_EN: +// process.env.META_DESCRIPTION_EN || +// 'Gratitude is the currency of the new age. More and more people are unleashing their potential and shaping a good future for all.', +// META_KEYWORDS_DE: +// process.env.META_KEYWORDS_DE || +// 'Grundeinkommen, Währung, Dankbarkeit, Schenk-Ökonomie, Natürliche Ökonomie des Lebens, Ökonomie, Ökologie, Potenzialentfaltung, Schenken und Danken, Kreislauf des Lebens, Geldsystem', +// META_KEYWORDS_EN: +// process.env.META_KEYWORDS_EN || +// 'Basic Income, Currency, Gratitude, Gift Economy, Natural Economy of Life, Economy, Ecology, Potential Development, Giving and Thanking, Cycle of Life, Monetary System', +// META_AUTHOR: process.env.META_AUTHOR || 'Bernd Hückstädt - Gradido-Akademie', +// } + const endpoints = { GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost/graphql', ADMIN_AUTH_URL: process.env.ADMIN_AUTH_URL || 'http://localhost/admin/authenticate?token={token}', diff --git a/frontend/vue.config.js b/frontend/vue.config.js index 14dbdd5a4..133f90846 100644 --- a/frontend/vue.config.js +++ b/frontend/vue.config.js @@ -41,20 +41,17 @@ module.exports = { new StatsPlugin('webpack.stats.json'), new HtmlWebpackPlugin({ vue: true, - title: 'XGRADIDO', template: 'public/index.html', - description_de: - 'Dankbarkeit ist die Währung der neuen Zeit. Immer mehr Menschen entfalten ihr Potenzial und gestalten eine gute Zukunft für alle.', - description_en: - 'Gratitude is the currency of the new age. More and more people are unleashing their potential and shaping a good future for all.', - keywords_de: - 'Grundeinkommen, Währung, Dankbarkeit, Schenk-Ökonomie, Natürliche Ökonomie des Lebens, Ökonomie, Ökologie, Potenzialentfaltung, Schenken und Danken, Kreislauf des Lebens, Geldsystem', - keywords_en: - 'Basic Income, Currency, Gratitude, Gift Economy, Natural Economy of Life, Economy, Ecology, Potential Development, Giving and Thanking, Cycle of Life, Monetary System', - author: 'Bernd Hückstädt - Gradido-Akademie', - url: 'http://localhost', - identifier_URL: 'http://localhost', - icon: './favicon.png', + meta: { + title_de: process.env.META_TITLE_DE, + title_en: process.env.META_TITLE_EN, + description_de: process.env.META_DESCRIPTION_DE, + description_en: process.env.META_DESCRIPTION_EN, + keywords_de: process.env.META_KEYWORDS_DE, + keywords_en: process.env.META_KEYWORDS_EN, + author: process.env.META_AUTHOR, + url: process.env.META_URL, + }, }), ], infrastructureLogging: {