From 68996cea70864d9d35b3a17fab729ba84eaa3aaa Mon Sep 17 00:00:00 2001 From: elweyn Date: Wed, 29 Nov 2023 21:37:47 +0100 Subject: [PATCH 1/2] feat(content): set navbar in the locales. --- docs/.vuepress/config/theme.js | 66 +++++++++++++++++++++++++--------- docs/en/impressum/README.md | 4 +-- docs/impressum/README.md | 4 +-- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/docs/.vuepress/config/theme.js b/docs/.vuepress/config/theme.js index 50763b7..3c20d1d 100644 --- a/docs/.vuepress/config/theme.js +++ b/docs/.vuepress/config/theme.js @@ -11,24 +11,56 @@ export default hopeTheme({ contributors: false, displayFooter: true, print: false, - copyright: '© by busFaktor() e.V. & Authors | Impressum', - footer: 'Released under the MIT License.', - navbar: [ - { - text: 'Documentation', link: 'https://docs.ocelot.social/' + locales:{ + // The key is the path for the locale to be nested under. + // As a special case, the default locale can use '/' as its path. + '/en/': { + lang: 'en-US', // this will be set as the lang attribute on + title: 'Ocelot.Social', + // description: '' + copyright: '© by busFaktor() e.V. & Authors | Impressum', + footer: 'Released under the MIT License.', + navbar: [ + { + text: 'Documentation', link: 'https://docs.ocelot.social/' + }, + { + text: 'Demo', link: 'https://stage.ocelot.social/' + }, + { + text: 'Github', + link: 'https://github.com/Ocelot-Social-Community' + }, + { + text: 'Imprint', + link: '/impressum/' + }, + ], }, - { - text: 'Demo', link: 'https://stage.ocelot.social/' - }, - { - text: 'Github', - link: 'https://github.com/Ocelot-Social-Community' - }, - { - text: 'Impressum', - link: '/impressum/' - }, - ], + '/': { + lang: 'de-DE', + title: 'Ocelot.Social', + // description: '' + copyright: '© von busFaktor() e.V. & Authoren | Impressum', + footer: 'Unter der MIT License ausgeliefert.', + navbar: [ + { + text: 'Documentation', link: 'https://docs.ocelot.social/' + }, + { + text: 'Demo', link: 'https://stage.ocelot.social/' + }, + { + text: 'Github', + link: 'https://github.com/Ocelot-Social-Community' + }, + { + text: 'Impressum', + link: '/impressum/' + }, + ], + } + }, plugins: { mdEnhance: { align: true, diff --git a/docs/en/impressum/README.md b/docs/en/impressum/README.md index 8d07deb..6edcf5a 100644 --- a/docs/en/impressum/README.md +++ b/docs/en/impressum/README.md @@ -3,9 +3,7 @@ home: false # layout: BlogHome icon: home title: Imprint | Ocelot.Social -heroFullScreen: false -heroImage: /logo.svg -heroText: Free and open-source social network for active citizenship. +sidebar: false tagLine: # actions: # - text: Demo diff --git a/docs/impressum/README.md b/docs/impressum/README.md index 3e6671e..63b7334 100644 --- a/docs/impressum/README.md +++ b/docs/impressum/README.md @@ -3,9 +3,7 @@ home: false # layout: BlogHome icon: home title: Impressum | Ocelot.Social -heroFullScreen: false -heroImage: /logo.svg -heroText: Free and open-source social network for active citizenship. +sidebar: false tagLine: # actions: # - text: Demo From e5caa115fc5dd03359d1f19c99586dc1b20fc7a7 Mon Sep 17 00:00:00 2001 From: elweyn Date: Thu, 30 Nov 2023 14:57:03 +0100 Subject: [PATCH 2/2] Reintroduce the navbar on the config.js, translate the footer, add french the navbar. --- docs/.vuepress/config.js | 11 ++++++ docs/.vuepress/config/theme.js | 65 ++++++++++++++++++++++++---------- docs/fr/impressum/README.md | 2 +- 3 files changed, 58 insertions(+), 20 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e5b3229..066f3fe 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -8,4 +8,15 @@ export default defineUserConfig({ theme, plugins, base: process.env.VUEPRESS_BASE ?? '/', + locales: { + '/': { + lang: 'de-DE', + }, + '/en/': { + lang: 'en-EN', + }, + '/fr/': { + lang: 'fr-FR', + }, + } }) \ No newline at end of file diff --git a/docs/.vuepress/config/theme.js b/docs/.vuepress/config/theme.js index 3c20d1d..1734a31 100644 --- a/docs/.vuepress/config/theme.js +++ b/docs/.vuepress/config/theme.js @@ -4,6 +4,7 @@ export default hopeTheme({ favicon: 'favicon.ico', logo: '/logo.svg', docsRepo: 'https://github.com/Ocelot-Social-Community/ocelot.social', + repo: 'https://github.com/Ocelot-Social-Community/Ocelot-Social', docsBranch: 'master', docsDir: 'docs', editLink: true, @@ -11,25 +12,52 @@ export default hopeTheme({ contributors: false, displayFooter: true, print: false, + navbarLayout: { + start: ["Brand"], + center: ["Links"], + end: ["Language", "Repo", "Search"], + }, locales:{ // The key is the path for the locale to be nested under. // As a special case, the default locale can use '/' as its path. + '/': { + lang: 'de-DE', + title: 'Ocelot.Social', + copyright: '© von busFaktor() e.V. & Authoren | Impressum', + footer: 'Unter der MIT Lizenz ausgeliefert.', + navbar: [ + { + text: 'Documentation', + link: 'https://docs.ocelot.social/' , + target: '_self', + }, + { + text: 'Demo', + link: 'https://stage.ocelot.social/', + target: '_self', + }, + { + text: 'Impressum', + link: '/impressum/' + }, + ], + }, '/en/': { lang: 'en-US', // this will be set as the lang attribute on title: 'Ocelot.Social', // description: '' - copyright: '© by busFaktor() e.V. & Authors | Impressum', + copyright: '© by busFaktor() e.V. & Authors | Impressum', footer: 'Released under the MIT License.', navbar: [ { - text: 'Documentation', link: 'https://docs.ocelot.social/' + text: 'Documentation', + link: 'https://docs.ocelot.social/', + target: '_self', }, { - text: 'Demo', link: 'https://stage.ocelot.social/' - }, - { - text: 'Github', - link: 'https://github.com/Ocelot-Social-Community' + text: 'Demo', + link: 'https://stage.ocelot.social/', + target: '_self', }, { text: 'Imprint', @@ -37,25 +65,24 @@ export default hopeTheme({ }, ], }, - '/': { - lang: 'de-DE', + '/fr/': { + lang: 'fr-FR', title: 'Ocelot.Social', - // description: '' - copyright: '© von busFaktor() e.V. & Authoren | Impressum', - footer: 'Unter der MIT License ausgeliefert.', + copyright: '© par busFaktor() e.V. & Auteurs | Mentions légales', + footer: 'Publié sous la licence MIT.', navbar: [ { - text: 'Documentation', link: 'https://docs.ocelot.social/' + text: 'Documentation', + link: 'https://docs.ocelot.social/', + target: '_self', }, { - text: 'Demo', link: 'https://stage.ocelot.social/' + text: 'Demo', + link: 'https://stage.ocelot.social/', + target: '_self', }, { - text: 'Github', - link: 'https://github.com/Ocelot-Social-Community' - }, - { - text: 'Impressum', + text: 'Mentions légales', link: '/impressum/' }, ], diff --git a/docs/fr/impressum/README.md b/docs/fr/impressum/README.md index 69e031e..d2e7306 100644 --- a/docs/fr/impressum/README.md +++ b/docs/fr/impressum/README.md @@ -1,5 +1,5 @@ --- -home: true +home: false # layout: BlogHome # icon: home sidebar: false