Skip to content

Commit

Permalink
fix about meta💯
Browse files Browse the repository at this point in the history
  • Loading branch information
foxundermoon committed Mar 7, 2020
1 parent 2fb7377 commit a003d26
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions packages/website/pages/[lang]/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,34 @@ import Layout from '../../components/Layout';
import About from '~/components/section/About.mdx';
import withLocale from '../../src/hocs/withLocale';
import { GetstaticProps } from '../../src/types/next';
import locales from '../../src/translations/locales'
import locales from '../../src/translations/locales';
import useTranslation from '../../src/hooks/useTranslation';
import { PageMeta } from '../../src/PageMeta';

const AboutPage = () => {
const { t, locale } = useTranslation();
const commonKeyworks = ['wefox'];

const meta: PageMeta = {
title: 'About WeFox Technology',
keywords: [...commonKeyworks, 'technical consulting', 'Technical Adviser'],
description: 'Professional technical consulting and consulting services',
zh: {
title: '关于微狐科技',
keywords: [...commonKeyworks, '微狐', '微狐科技', '技术咨询', '技术顾问'],
description: '专业的技术咨询、顾问服务',
},
};


const AboutPage = () =>{
const {t} = useTranslation()

return (
<Layout title={t('inc.name')}>
<About />
</Layout>
);
}
return (
<Layout meta={meta}>
<About />
</Layout>
);
};

export default withLocale(AboutPage);


export async function unstable_getStaticPaths() {
return {
paths: ['en', 'zh'].map(l => ({ params: { lang: l } })),
Expand All @@ -31,7 +42,7 @@ export const unstable_getStaticProps: GetstaticProps = async ({ params }) => {

return {
props: {
locale: lang,
locale: lang,
translations: locales[lang]['common'],
},
};
Expand Down

1 comment on commit a003d26

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit a003d26

https://home-website-i7i69ab6j.now.sh

Please sign in to comment.