feat: fix missing privacy in sidebar
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit not only fixes the missing privacy page in the sidebar when the website is in English or Elefen, but it also simplifies listing all pages available on the website regardless of the language.
This commit is contained in:
parent
158b61e57c
commit
9641f40f65
@ -2,7 +2,7 @@ import { defineUserConfig, defaultTheme } from 'vuepress';
|
|||||||
import { removeHtmlExtensionPlugin } from 'vuepress-plugin-remove-html-extension';
|
import { removeHtmlExtensionPlugin } from 'vuepress-plugin-remove-html-extension';
|
||||||
import head from './head';
|
import head from './head';
|
||||||
import locales from './locales';
|
import locales from './locales';
|
||||||
import themeLocales from './themeLocales';
|
import { themeLocales } from './themeLocales';
|
||||||
|
|
||||||
export default defineUserConfig({
|
export default defineUserConfig({
|
||||||
lang: 'fr-FR',
|
lang: 'fr-FR',
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
const themeLocales = {
|
const pages: string[] = [
|
||||||
|
'/index.md',
|
||||||
|
'/about.md',
|
||||||
|
'/find-me.md',
|
||||||
|
'/resume.md',
|
||||||
|
'/projects.md',
|
||||||
|
'/conlanging.md',
|
||||||
|
'/vocal-synthesis.md',
|
||||||
|
'/privacy.md',
|
||||||
|
];
|
||||||
|
|
||||||
|
const localePages = (languagePrefix: string) => {
|
||||||
|
return pages.map((page: string) => `/${languagePrefix}${page}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const themeLocales = {
|
||||||
'/': {
|
'/': {
|
||||||
selectLanguageName: 'Français',
|
selectLanguageName: 'Français',
|
||||||
tip: 'nota bene',
|
tip: 'nota bene',
|
||||||
warning: 'attention',
|
warning: 'attention',
|
||||||
sidebar: [
|
sidebar: pages,
|
||||||
'/README.md',
|
|
||||||
'/about.md',
|
|
||||||
'/find-me.md',
|
|
||||||
'/resume.md',
|
|
||||||
'/projects.md',
|
|
||||||
'/conlanging.md',
|
|
||||||
'/vocal-synthesis.md',
|
|
||||||
'/privacy.md',
|
|
||||||
],
|
|
||||||
notFound: [
|
notFound: [
|
||||||
'C’est bien vide ici',
|
'C’est bien vide ici',
|
||||||
'Pourquoi sommes-nous ici?',
|
'Pourquoi sommes-nous ici?',
|
||||||
@ -30,15 +36,7 @@ const themeLocales = {
|
|||||||
tip: 'avisa',
|
tip: 'avisa',
|
||||||
warning: 'averti',
|
warning: 'averti',
|
||||||
danger: 'peril',
|
danger: 'peril',
|
||||||
sidebar: [
|
sidebar: localePages('lfn'),
|
||||||
'/lfn/index.md',
|
|
||||||
'/lfn/about.md',
|
|
||||||
'/lfn/find-me.md',
|
|
||||||
'/lfn/resume.md',
|
|
||||||
'/lfn/projects.md',
|
|
||||||
'/lfn/conlanging.md',
|
|
||||||
'/lfn/vocal-synthesis.md',
|
|
||||||
],
|
|
||||||
notFound: [
|
notFound: [
|
||||||
'Ce? Se no ave no cosa asi',
|
'Ce? Se no ave no cosa asi',
|
||||||
'A do vade tu?',
|
'A do vade tu?',
|
||||||
@ -53,16 +51,6 @@ const themeLocales = {
|
|||||||
},
|
},
|
||||||
'/en/': {
|
'/en/': {
|
||||||
selectLanguageName: 'English',
|
selectLanguageName: 'English',
|
||||||
sidebar: [
|
sidebar: localePages('en'),
|
||||||
'/en/index.md',
|
|
||||||
'/en/about.md',
|
|
||||||
'/en/find-me.md',
|
|
||||||
'/en/resume.md',
|
|
||||||
'/en/projects.md',
|
|
||||||
'/en/conlanging.md',
|
|
||||||
'/en/vocal-synthesis.md',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default themeLocales;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user