mirror of
https://github.com/smyalygames/flightsim-on-linux.git
synced 2025-07-12 21:01:00 +02:00
feat: add meta for each page in theme.config.tsx
This commit is contained in:
parent
1acd4133f1
commit
8e0b0c3c03
@ -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 (
|
||||
<>
|
||||
<meta property="og:url" content={url} />
|
||||
<meta property="og:title" content={frontMatter.title || 'Flight Sim on Linux'} />
|
||||
<meta
|
||||
property="og:description"
|
||||
content={frontMatter.description || 'Guides to running Flight Simulators on Linux'}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
},
|
||||
footer: {
|
||||
text: (
|
||||
<span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user