summaryrefslogtreecommitdiffstats
path: root/src/components/PostPreview
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-29 23:38:13 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-29 23:38:13 +0100
commit82d310403c4bb09bc2f0a204b6374934a10cf348 (patch)
tree488e93e373a7d9215531bb8fcfc37bcbb290d0fa /src/components/PostPreview
parentf49dfba86b9ac745ddc374ee0f02f03d7e81d872 (diff)
refactor(config): move config from config dir to utils
Diffstat (limited to 'src/components/PostPreview')
-rw-r--r--src/components/PostPreview/PostPreview.tsx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/PostPreview/PostPreview.tsx b/src/components/PostPreview/PostPreview.tsx
index 72ba638..0be9709 100644
--- a/src/components/PostPreview/PostPreview.tsx
+++ b/src/components/PostPreview/PostPreview.tsx
@@ -1,9 +1,9 @@
import { ButtonLink } from '@components/Buttons';
import { ArrowIcon } from '@components/Icons';
import PostMeta from '@components/PostMeta/PostMeta';
-import { config } from '@config/website';
import { TitleLevel } from '@ts/types/app';
import { ArticleMeta, ArticlePreview } from '@ts/types/articles';
+import { settings } from '@utils/config';
import Image from 'next/image';
import Head from 'next/head';
import Link from 'next/link';
@@ -49,18 +49,18 @@ const PostPreview = ({
name: title,
description: intro,
articleBody: intro,
- author: { '@id': `${config.url}/#branding` },
+ author: { '@id': `${settings.url}/#branding` },
commentCount: commentCount ? commentCount : 0,
copyrightYear: publicationDate.getFullYear(),
- creator: { '@id': `${config.url}/#branding` },
+ creator: { '@id': `${settings.url}/#branding` },
dateCreated: publicationDate.toISOString(),
dateModified: updateDate.toISOString(),
datePublished: publicationDate.toISOString(),
- editor: { '@id': `${config.url}/#branding` },
+ editor: { '@id': `${settings.url}/#branding` },
image: featuredImage?.sourceUrl,
- inLanguage: config.locales.defaultLocale,
- isBasedOn: `${config.url}/article/${slug}`,
- isPartOf: { '@id': `${config.url}/blog` },
+ inLanguage: settings.locales.defaultLocale,
+ isBasedOn: `${settings.url}/article/${slug}`,
+ isPartOf: { '@id': `${settings.url}/blog` },
license: 'https://creativecommons.org/licenses/by-sa/4.0/deed.fr',
thumbnailUrl: featuredImage?.sourceUrl,
};