@@ -11,9 +11,7 @@ import { Section } from "components/Section";
1111import { SiteLayout } from "components/SiteLayout" ;
1212import { ValueSection } from "components/ValueSection" ;
1313import { siteConf } from "conf" ;
14- import { readFileSync } from "fs" ;
15- import yaml from "js-yaml" ;
16- import { dataDirectory , getRandomCta } from "lib/posts" ;
14+ import { getRandomCta } from "lib/posts" ;
1715import {
1816 ChevronRight ,
1917 FileJson ,
@@ -23,22 +21,17 @@ import {
2321 SquareTerminalIcon ,
2422} from "lucide-react" ;
2523import { NextPage } from "next" ;
26- import path from "path" ;
2724import { RepoCard } from "../components/RepoCard" ;
2825
2926export async function getStaticProps ( ) {
30- const projectsData = readFileSync ( path . join ( dataDirectory , "projects.yml" ) ) ;
31-
3227 return {
3328 props : {
34- projects : yaml . load ( projectsData ) ,
3529 cta : getRandomCta ( ) ,
3630 } ,
3731 } ;
3832}
3933
40- export const IndexPage : NextPage < { projects : any [ ] ; cta : CtaProps } > = ( {
41- projects,
34+ export const IndexPage : NextPage < { cta : CtaProps } > = ( {
4235 cta,
4336} ) => {
4437 return (
@@ -128,21 +121,6 @@ export const IndexPage: NextPage<{ projects: any[]; cta: CtaProps }> = ({
128121 </ footer >
129122 </ section >
130123 </ Section >
131-
132- < Section label = "Projects" Icon = { PresentationIcon } spaced >
133- < Carousel
134- slides = { projects . map ( ( p , i ) => (
135- < ProjectSlide
136- key = { i }
137- title = { p . title }
138- content = { < MarkdownContent content = { p . content } /> }
139- image = { p . image }
140- button = { p . button }
141- link = { p . link }
142- />
143- ) ) }
144- />
145- </ Section >
146124 </ SiteLayout >
147125 </ >
148126 ) ;
0 commit comments