From 016b300e7e2dd54da2c6215b760acab072afabc9 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Thu, 9 Feb 2023 23:06:52 +0100 Subject: [PATCH] [seo] add keywords support --- locale/en/translations.suml | 28 ++++++++++++++++++++++++++++ nuxt.config.js | 4 ++++ routes/profile.vue | 12 ++++++++++++ src/helpers.js | 6 +++++- 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/locale/en/translations.suml b/locale/en/translations.suml index 1b7d1fb16..365f77707 100644 --- a/locale/en/translations.suml +++ b/locale/en/translations.suml @@ -1486,3 +1486,31 @@ calendar: ukraine: header: 'We stand with Ukraine.' link: '{https://supportukrainenow.org=Here''s how you can support them.}' + +seo: + keywords: + - 'pronouns' + - 'inclusive language' + - 'inclusivity' + - 'diversity' + - 'dei' + - 'queer' + - 'lgbtq' + - 'lgbt' + - 'lgbtq page' + - 'lgbt page' + - 'not binary' + - 'non binary' + - 'nonbinary' + - 'non-binary' + - 'gay rights' + - 'trans rights' + - 'lesbian' + - 'gay' + - 'transgender' + - 'trans' + - 'lgbtq youth' + - 'lgbt youth' + - 'i support lgbt' + - 'i support lgbtq' + - 'i support gay rights' diff --git a/nuxt.config.js b/nuxt.config.js index b196c715a..b295cd468 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -13,6 +13,7 @@ const locale = config.locale; const locales = buildLocaleList(locale); const title = translations.title; const description = translations.description; +const keywords = (translations?.seo?.keywords || []).join(', ') const banner = process.env.BASE_URL + '/api/banner/zaimki.png'; const colour = '#C71585'; const logo = fs.readFileSync(__dirname + '/static/logo/logo.svg').toString('utf-8').replace('/>', 'fill="currentColor"/>'); @@ -116,6 +117,8 @@ export default { { hid: 'description', name: 'description', content: description }, + { hid: 'keywords', name: 'keywords', content: keywords }, + { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'apple-mobile-web-app-title', name: 'apple-mobile-web-app-title', content: title }, { hid: 'theme-color', name: 'theme-color', content: colour }, @@ -231,6 +234,7 @@ export default { PLAUSIBLE_API_HOST: process.env.PLAUSIBLE_API_HOST, HEARTBEAT_LINK: process.env.HEARTBEAT_LINK, VERSION: version, + KEYWORDS: keywords, }, serverMiddleware: [ '~/server/no-ssr.js', diff --git a/routes/profile.vue b/routes/profile.vue index cf6d31f7c..26dd534f3 100644 --- a/routes/profile.vue +++ b/routes/profile.vue @@ -195,6 +195,8 @@