95 lines
No EOL
2.5 KiB
TypeScript
95 lines
No EOL
2.5 KiB
TypeScript
import React from 'react';
|
|
import { Helmet } from 'react-helmet-async';
|
|
import { useTranslation } from 'react-i18next';
|
|
import About from '../components/About';
|
|
|
|
const AboutPage = () => {
|
|
const { t, i18n } = useTranslation();
|
|
const currentLang = i18n.language;
|
|
|
|
const pageTitle = t('about.meta.title');
|
|
const pageDescription = t('about.meta.description');
|
|
|
|
// 构建页面级别的结构化数据
|
|
const schemaOrg = {
|
|
'@context': 'https://schema.org',
|
|
'@type': 'AboutPage',
|
|
name: pageTitle,
|
|
description: pageDescription,
|
|
url: 'https://mirror.starset.fans/about',
|
|
inLanguage: currentLang,
|
|
isPartOf: {
|
|
'@type': 'WebSite',
|
|
name: 'STARSET Mirror',
|
|
url: 'https://mirror.starset.fans'
|
|
},
|
|
breadcrumb: {
|
|
'@type': 'BreadcrumbList',
|
|
itemListElement: [
|
|
{
|
|
'@type': 'ListItem',
|
|
position: 1,
|
|
item: {
|
|
'@id': 'https://mirror.starset.fans',
|
|
name: t('nav.home')
|
|
}
|
|
},
|
|
{
|
|
'@type': 'ListItem',
|
|
position: 2,
|
|
item: {
|
|
'@id': 'https://mirror.starset.fans/projects',
|
|
name: t('nav.projects')
|
|
}
|
|
},
|
|
{
|
|
'@type': 'ListItem',
|
|
position: 3,
|
|
item: {
|
|
'@id': 'https://mirror.starset.fans/updates',
|
|
name: t('nav.updates')
|
|
}
|
|
},
|
|
{
|
|
'@type': 'ListItem',
|
|
position: 4,
|
|
item: {
|
|
'@id': 'https://mirror.starset.fans/contributors',
|
|
name: t('nav.contributors')
|
|
}
|
|
},
|
|
{
|
|
'@type': 'ListItem',
|
|
position: 5,
|
|
item: {
|
|
'@id': 'https://mirror.starset.fans/about',
|
|
name: t('nav.about')
|
|
}
|
|
}
|
|
]
|
|
}
|
|
};
|
|
|
|
return (
|
|
<>
|
|
<Helmet>
|
|
<html lang={currentLang} />
|
|
<title>{pageTitle}</title>
|
|
<meta name="description" content={pageDescription} />
|
|
<meta property="og:title" content={pageTitle} />
|
|
<meta property="og:description" content={pageDescription} />
|
|
<meta property="og:type" content="website" />
|
|
<meta name="twitter:title" content={pageTitle} />
|
|
<meta name="twitter:description" content={pageDescription} />
|
|
<script type="application/ld+json">
|
|
{JSON.stringify(schemaOrg)}
|
|
</script>
|
|
</Helmet>
|
|
<div className="py-20">
|
|
<About />
|
|
</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default AboutPage; |