Skip to content

Commit b80e097

Browse files
committed
date published/modified for all pages
1 parent 5f1fee5 commit b80e097

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/routes/contact.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
} from 'app/appConstants';
1212
import Contact from 'features/Contact/Contact';
1313
import { getImageSize } from 'utils/getImageSize';
14+
import { REPOSITORY_INFO } from 'utils/githubData';
1415

1516
const breadcrumbList: BreadcrumbList = {
1617
'@type': 'BreadcrumbList',
@@ -65,6 +66,8 @@ export const meta: MetaFunction = () => {
6566
breadcrumb: { '@id': 'https://piech.dev/contact/#breadcrumb' },
6667
primaryImageOfPage: { '@id': 'https://piech.dev/contact/#image' },
6768
image: { '@id': 'https://piech.dev/contact/#image' },
69+
datePublished: REPOSITORY_INFO['piech.dev']?.createdDatetime,
70+
dateModified: new Date().toISOString(),
6871
};
6972

7073
const graph: Graph = {

src/routes/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ export const WEBSITE: WebSite = {
113113
author: { '@id': PERSON_ID },
114114
publisher: { '@id': PERSON_ID },
115115
copyrightHolder: { '@id': PERSON_ID },
116+
datePublished: REPOSITORY_INFO['piech.dev']?.createdDatetime,
117+
dateModified: new Date().toISOString(),
116118
};
117119

118120
export const meta: MetaFunction = () => {
@@ -152,7 +154,7 @@ export const meta: MetaFunction = () => {
152154
primaryImageOfPage: { '@id': PIOTR_IMAGE_ID },
153155
image: { '@id': PIOTR_IMAGE_ID },
154156
datePublished: REPOSITORY_INFO['piech.dev']?.createdDatetime,
155-
dateModified: REPOSITORY_INFO['piech.dev']?.lastCommitDatetime,
157+
dateModified: new Date().toISOString(),
156158
};
157159

158160
const personNode: Person = {

src/routes/projects.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
import Projects from 'features/Projects/Projects';
2121
import { PROJECTS } from 'features/Projects/projectsList';
2222
import { getImageSize } from 'utils/getImageSize';
23+
import { REPOSITORY_INFO } from 'utils/githubData';
2324

2425
const projectsItemList: ItemList = {
2526
'@type': 'ItemList',
@@ -97,6 +98,8 @@ export const meta: MetaFunction = () => {
9798
mainEntity: projectsItemList,
9899
primaryImageOfPage: { '@id': 'https://piech.dev/projects/#main-image' },
99100
image: { '@id': 'https://piech.dev/projects/#main-image' },
101+
datePublished: REPOSITORY_INFO['piech.dev']?.createdDatetime,
102+
dateModified: new Date().toISOString(),
100103
};
101104

102105
const graph: Graph = {

0 commit comments

Comments
 (0)