From 7063b199b4748a9c354ed37e64cdc84c512f2c0c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 14 Dec 2023 15:30:34 +0100 Subject: refactor(pages): rewrite helpers to output schema in json-ld format * make sure url are absolutes * nest breadcrumb schema in webpage schema * trim HTML tags from content/description * use a regular script instead of next/script (with the latter the schema is not updated on route change) * place the script in document head * add keywords, wordCount and readingTime keys in BlogPosting schema * fix breadcrumbs in search page (without query) * add tests (a `MatchInlineSnapshot` will be better but Prettier 3 is not supported yet) --- src/utils/constants.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utils/constants.ts') diff --git a/src/utils/constants.ts b/src/utils/constants.ts index e968f31..b6f0667 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -30,6 +30,11 @@ export const PAGINATED_ROUTE_PREFIX = '/page'; // cSpell:ignore legales thematique developpement +export const ARTICLE_ID = 'article'; +export const AUTHOR_ID = 'branding'; +export const COMMENT_ID_PREFIX = 'comment-'; +export const COMMENTS_SECTION_ID = 'comments'; + export const STORAGE_KEY = { ACKEE: 'ackee-tracking', MOTION: 'reduced-motion', -- cgit v1.2.3