@@ -5,10 +5,15 @@ import { Image } from "astro:assets";
55import { Schema } from " astro-seo-schema" ;
66import { isPartOfSeries , getAllSeries } from " ../../utils/seriesUtils" ;
77import SeriesIndicator from " ../../components/article/series_indicator.astro" ;
8- import siteMetadata from " ../../../metadata" ;
8+
9+ interface Social { platform: string ; url: string ; }
10+ interface ProfileData { name: string ; socials: Social []; }
11+
12+ const profileEntry = await getCollection (" profile" );
13+ const profile = profileEntry [0 ].data as ProfileData ;
914
1015const page_info = {
11- title: " Article Series | Rishi Chawda " ,
16+ title: ` Article Series | ${ profile . name } ` ,
1217 description: " Explore multi-part article series covering in-depth topics in web development, React architecture, SEO, and more." ,
1318 keywords: " article series, multi-part articles, web development tutorials, React architecture, SEO guides" ,
1419};
@@ -49,14 +54,14 @@ const pageUrl = new URL(
4954 item ={ {
5055 " @context" : " https://schema.org" ,
5156 " @type" : " CollectionPage" ,
52- name: " Article Series by Rishi Chawda " ,
57+ name: ` Article Series by ${ profile . name } ` ,
5358 description: page_info .description ,
5459 url: pageUrl ,
5560 author: {
5661 " @type" : " Person" ,
57- name: siteMetadata . schema . author .name ,
58- url: siteMetadata . schema . author . url ,
59- sameAs: siteMetadata . schema . author . sameAs
62+ name: profile .name ,
63+ url: " https://rishikc.com " ,
64+ sameAs: profile . socials . map (( social : Social ) => social . url )
6065 },
6166 inLanguage: " en-US" ,
6267 dateCreated: allSeries .length > 0 ? allSeries [allSeries .length - 1 ].articles [0 ].data .date .toISOString () : undefined ,
@@ -73,13 +78,13 @@ const pageUrl = new URL(
7378 description: ` A ${series .totalParts }-part series on ${series .seriesTitle .toLowerCase ()} covering in-depth topics in web development and engineering. ` ,
7479 author: {
7580 " @type" : " Person" ,
76- name: siteMetadata . schema . author .name ,
77- url: siteMetadata . schema . author . url
81+ name: profile .name ,
82+ url: " https://rishikc.com "
7883 },
7984 publisher: {
8085 " @type" : " Person" ,
81- name: siteMetadata . schema . author .name ,
82- url: siteMetadata . schema . author . url
86+ name: profile .name ,
87+ url: " https://rishikc.com "
8388 },
8489 inLanguage: " en-US" ,
8590 startDate: series .articles [0 ].data .date .toISOString (),
@@ -96,13 +101,13 @@ const pageUrl = new URL(
96101 dateModified: article .data .date .toISOString (),
97102 author: {
98103 " @type" : " Person" ,
99- name: siteMetadata . schema . author .name ,
100- url: siteMetadata . schema . author . url
104+ name: profile .name ,
105+ url: " https://rishikc.com "
101106 },
102107 publisher: {
103108 " @type" : " Person" ,
104- name: siteMetadata . schema . author .name ,
105- url: siteMetadata . schema . author . url
109+ name: profile .name ,
110+ url: " https://rishikc.com "
106111 },
107112 inLanguage: " en-US" ,
108113 keywords: (article .data .tags || []).join (" , " ),
0 commit comments