diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-19 14:45:06 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-19 14:47:40 +0100 |
| commit | 1fa8d8281371db25ef9382b6087b7f3c0db73fe3 (patch) | |
| tree | 898aee1e9a23c06e9658de240474d90870190e68 /src/pages | |
| parent | a26b775b7bbf1abd3e99c8bf9ce4c7522d3a0adc (diff) | |
refactor(config): move defaultLocale as property of config.locales
I will need the country code, so I think it makes more sense to gather
them inside the same property.
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/article/[slug].tsx | 4 | ||||
| -rw-r--r-- | src/pages/blog/index.tsx | 4 | ||||
| -rw-r--r-- | src/pages/contact.tsx | 2 | ||||
| -rw-r--r-- | src/pages/cv.tsx | 2 | ||||
| -rw-r--r-- | src/pages/index.tsx | 2 | ||||
| -rw-r--r-- | src/pages/mentions-legales.tsx | 4 | ||||
| -rw-r--r-- | src/pages/sujet/[slug].tsx | 4 | ||||
| -rw-r--r-- | src/pages/thematique/[slug].tsx | 4 |
8 files changed, 13 insertions, 13 deletions
diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index 8c345b7..70a12dc 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -43,7 +43,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { }; const router = useRouter(); - const locale = router.locale ? router.locale : config.defaultLocale; + const locale = router.locale ? router.locale : config.locales.defaultLocale; useEffect(() => { addPrismClasses(); @@ -97,7 +97,7 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { discussionUrl: `${config.url}${router.asPath}/#comments`, editor: { '@id': `${config.url}/#branding` }, image: featuredImage?.sourceUrl, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, isPartOf: { '@id': `${config.url}/blog`, }, diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index 765a93b..bb16d37 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -68,7 +68,7 @@ const Blog: NextPageWithLayout<BlogPageProps> = ({ fallback }) => { breadcrumb: { '@id': `${config.url}/#breadcrumb` }, name: seo.blog.title, description: seo.blog.description, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, reviewedBy: { '@id': `${config.url}/#branding` }, url: `${config.url}`, isPartOf: { @@ -82,7 +82,7 @@ const Blog: NextPageWithLayout<BlogPageProps> = ({ fallback }) => { author: { '@id': `${config.url}/#branding` }, creator: { '@id': `${config.url}/#branding` }, editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, }; diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index ba462c0..659da8a 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -80,7 +80,7 @@ const ContactPage: NextPageWithLayout = () => { author: { '@id': `${config.url}/#branding` }, creator: { '@id': `${config.url}/#branding` }, editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, }; diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx index 78e9a6e..ac5841e 100644 --- a/src/pages/cv.tsx +++ b/src/pages/cv.tsx @@ -54,7 +54,7 @@ const CV: NextPageWithLayout = () => { datePublished: publicationDate.toISOString(), editor: { '@id': `${config.url}/#branding` }, image, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', thumbnailUrl: image, mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, diff --git a/src/pages/index.tsx b/src/pages/index.tsx index f59602f..32f1373 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -101,7 +101,7 @@ const Home: NextPageWithLayout = () => { author: { '@id': `${config.url}/#branding` }, creator: { '@id': `${config.url}/#branding` }, editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', reviewedBy: { '@id': `${config.url}/#branding` }, url: `${config.url}`, diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx index 81d8e98..e7da49a 100644 --- a/src/pages/mentions-legales.tsx +++ b/src/pages/mentions-legales.tsx @@ -38,7 +38,7 @@ const LegalNotice: NextPageWithLayout = () => { breadcrumb: { '@id': `${config.url}/#breadcrumb` }, name: seo.legalNotice.title, description: seo.legalNotice.description, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', reviewedBy: { '@id': `${config.url}/#branding` }, url: `${config.url}${router.asPath}`, @@ -59,7 +59,7 @@ const LegalNotice: NextPageWithLayout = () => { dateModified: updateDate.toISOString(), datePublished: publicationDate.toISOString(), editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, }; diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index 97c76c0..bc87845 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -59,7 +59,7 @@ const Subject: NextPageWithLayout<SubjectProps> = ({ subject }) => { breadcrumb: { '@id': `${config.url}/#breadcrumb` }, name: subject.seo.title, description: subject.seo.metaDesc, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, reviewedBy: { '@id': `${config.url}/#branding` }, url: `${config.url}`, isPartOf: { @@ -84,7 +84,7 @@ const Subject: NextPageWithLayout<SubjectProps> = ({ subject }) => { editor: { '@id': `${config.url}/#branding` }, thumbnailUrl: subject.featuredImage?.sourceUrl, image: subject.featuredImage?.sourceUrl, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, isPartOf: { '@id': `${config.url}/blog` }, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 660a207..1964146 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -58,7 +58,7 @@ const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => { breadcrumb: { '@id': `${config.url}/#breadcrumb` }, name: thematic.seo.title, description: thematic.seo.metaDesc, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, reviewedBy: { '@id': `${config.url}/#branding` }, url: `${config.url}`, }; @@ -78,7 +78,7 @@ const Thematic: NextPageWithLayout<ThematicProps> = ({ thematic }) => { dateModified: updateDate.toISOString(), datePublished: publicationDate.toISOString(), editor: { '@id': `${config.url}/#branding` }, - inLanguage: config.defaultLocale, + inLanguage: config.locales.defaultLocale, isPartOf: { '@id': `${config.url}/blog` }, license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr', mainEntityOfPage: { '@id': `${config.url}${router.asPath}` }, |
