From 8e0b0c3c035b40de036243c603f0c91ed0423bc3 Mon Sep 17 00:00:00 2001 From: Anthony Berg Date: Sat, 24 Jun 2023 02:08:03 +0100 Subject: [PATCH] feat: add meta for each page in theme.config.tsx --- src/theme.config.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/theme.config.tsx b/src/theme.config.tsx index 5698c3c..c5b5217 100644 --- a/src/theme.config.tsx +++ b/src/theme.config.tsx @@ -1,3 +1,6 @@ +import { useRouter } from 'next/router'; +import { useConfig } from 'nextra-theme-docs'; + export default { project: { link: 'https://github.com/smyalygames/flightsim-on-linux', @@ -9,6 +12,22 @@ export default { titleTemplate: '%s - Flight Sim on Linux' } }, + head: () => { + const { asPath, defaultLocale, locale } = useRouter(); + const { frontMatter } = useConfig(); + const url = 'https://www.flightsimonlinux.com' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`); + + return ( + <> + + + + + ) + }, footer: { text: (