@@ -7,6 +7,7 @@ import { DEFAULT_CONFIGURATION } from '@/lib/constants';
77import WorkExperience from ' @/components/ui/WorkExperience.astro' ;
88import Talk from ' @/components/ui/Talk.astro' ;
99import { sortByDateRange , sortByYear } from ' @/lib/utils' ;
10+ import { getSiteConfig } from ' @/lib/config' ;
1011
1112const entry = await getEntry (' pages' , ' homepage' );
1213
@@ -23,25 +24,31 @@ const sortedJobs = sortByDateRange(jobs);
2324
2425const talks = await getCollection (' talks' );
2526const sortedTalks = sortByYear (talks );
27+
28+ const config = getSiteConfig ();
2629---
2730
2831<BaseLayout seo ={ entry .data .seo } >
29- <Container as =" section" class =" py-6" >
30- <Author {... DEFAULT_CONFIGURATION .author } />
31- </Container >
32+ { config .elements .avatar && (
33+ <Container as = " section" class = " py-6" >
34+ <Author { ... DEFAULT_CONFIGURATION .author } />
35+ </Container >
36+ )}
3237
33- <Container as =" section" class =" py-6" >
34- <div class =" flex flex-col gap-6" >
35- <div class =" flex items-center" >
36- <span class =" text-headings" >About</span >
37- </div >
38- <div class =" prose dark:prose-invert" >
39- <Content />
38+ { config .sections .about && (
39+ <Container as = " section" class = " py-6" >
40+ <div class = " flex flex-col gap-6" >
41+ <div class = " flex items-center" >
42+ <span class = " text-headings" >About</span >
43+ </div >
44+ <div class = " prose dark:prose-invert" >
45+ <Content />
46+ </div >
4047 </div >
41- </div >
42- </ Container >
48+ </Container >
49+ ) }
4350 {
44- links .length > 0 && (
51+ config . sections . socialLinks && links .length > 0 && (
4552 <Container as = " section" class = " py-8" >
4653 <div class = " flex flex-col gap-5" >
4754 <span class = " text-headings" >Contact</span >
@@ -69,7 +76,7 @@ const sortedTalks = sortByYear(talks);
6976 )
7077 }
7178 {
72- sortedJobs .length > 0 && (
79+ config . sections . workExperience && sortedJobs .length > 0 && (
7380 <Container as = " section" class = " py-6" >
7481 <div class = " flex flex-col gap-5" >
7582 <span class = " text-headings" >Work Experience</span >
@@ -83,7 +90,7 @@ const sortedTalks = sortByYear(talks);
8390 )
8491 }
8592 {
86- talks .length > 0 && (
93+ config . sections . talks && sortedTalks .length > 0 && (
8794 <Container as = " section" class = " py-6" >
8895 <div class = " flex flex-col gap-5" >
8996 <span class = " text-headings" >Speaking</span >
0 commit comments