configure redirect to default locale

This commit is contained in:
mahula 2024-05-22 06:15:57 +02:00
parent e0cc0fc3be
commit 8d0bc7cfaa

View File

@ -53,72 +53,72 @@ export default hopeTheme({
}, },
], ],
}, },
'/en/': { // '/en/': {
lang: 'en-US', // this will be set as the lang attribute on <html> // lang: 'en-US', // this will be set as the lang attribute on <html>
title: 'Ocelot.Social', // title: 'Ocelot.Social',
description: 'Ocelot.Social Free and open source software to create and run your own social network.', // description: 'Ocelot.Social Free and open source software to create and run your own social network.',
copyright: '&copy; by <a href="https://busfaktor.org" target="_blank">busFaktor() e.V.</a> & Authors | <a href="/en/imprint/">Imprint</a> | <a href="/en/privacy-policy/">Privacy Policy</a>', // copyright: '&copy; by <a href="https://busfaktor.org" target="_blank">busFaktor() e.V.</a> & Authors | <a href="/en/imprint/">Imprint</a> | <a href="/en/privacy-policy/">Privacy Policy</a>',
footer: 'Released under the <a class="vt-link link link" href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><!--[-->MIT License<!--]--><!----></a>.', // footer: 'Released under the <a class="vt-link link link" href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><!--[-->MIT License<!--]--><!----></a>.',
navbar: [ // navbar: [
{ // {
text: 'Features', // text: 'Features',
link: '/en/features/' // link: '/en/features/'
}, // },
{ // {
text: 'Get Started', // text: 'Get Started',
link: '/en/get-started/' // link: '/en/get-started/'
}, // },
{ // {
text: 'Contribute', // text: 'Contribute',
link: '/en/contribute/' // link: '/en/contribute/'
}, // },
{ // {
text: 'Learn', // text: 'Learn',
link: '/en/learn/' , // link: '/en/learn/' ,
}, // },
{ // {
text: 'Donate', // text: 'Donate',
link: '/en/donate/' // link: '/en/donate/'
}, // },
{ // {
text: 'Contact', // text: 'Contact',
link: '/en/contact/' // link: '/en/contact/'
}, // },
], // ],
}, // },
'/fr/': { // '/fr/': {
lang: 'fr-FR', // lang: 'fr-FR',
title: 'Ocelot.Social', // title: 'Ocelot.Social',
description: 'Ocelot.Social - Logiciel open source et gratuit pour créer et gérer votre propre réseau social.', // description: 'Ocelot.Social - Logiciel open source et gratuit pour créer et gérer votre propre réseau social.',
copyright: '&copy; par <a href="https://busfaktor.org" target="_blank">busFaktor() e.V.</a> & Auteurs | <a href="/fr/imprint/">Mentions légales</a> | <a href="/fr/privacy-policy/">Protection des données</a>', // copyright: '&copy; par <a href="https://busfaktor.org" target="_blank">busFaktor() e.V.</a> & Auteurs | <a href="/fr/imprint/">Mentions légales</a> | <a href="/fr/privacy-policy/">Protection des données</a>',
footer: 'Publié sous la <a class="vt-link link link" href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><!--[-->licence MIT<!--]--><!----></a>.', // footer: 'Publié sous la <a class="vt-link link link" href="https://opensource.org/licenses/MIT" target="_blank" rel="noopener noreferrer"><!--[-->licence MIT<!--]--><!----></a>.',
navbar: [ // navbar: [
{ // {
text: 'Fonctionnalités', // text: 'Fonctionnalités',
link: '/fr/features/' // link: '/fr/features/'
}, // },
{ // {
text: 'Entrée', // text: 'Entrée',
link: '/fr/get-started/' // link: '/fr/get-started/'
}, // },
{ // {
text: 'Contribuer', // text: 'Contribuer',
link: '/fr/contribute/' // link: '/fr/contribute/'
}, // },
{ // {
text: 'Apprendre', // text: 'Apprendre',
link: '/fr/learn/' , // link: '/fr/learn/' ,
}, // },
{ // {
text: 'Donner', // text: 'Donner',
link: '/fr/donate/' // link: '/fr/donate/'
}, // },
{ // {
text: 'Contact', // text: 'Contact',
link: '/fr/contact/' // link: '/fr/contact/'
}, // },
], // ],
} // }
}, },
plugins: { plugins: {
blog: { blog: {
@ -135,7 +135,13 @@ export default hopeTheme({
vPre: true, vPre: true,
}, },
redirect: { redirect: {
autoLocale: false, autoLocale: true,
defaultBehavior: 'defaultLocale',
defaultLocale: '/de/',
localeConfig: {
'/de/': ['de-DE', 'en'],
},
localeFallback: false,
}, },
searchPro: { searchPro: {
indexContent: true, indexContent: true,