import fs from "fs"; import matter from "gray-matter"; import Link from "next/link"; import path from "path"; import Container from "../components/Container"; import Layout from "../components/Layout"; import Sidemenu from "../components/Sidemenu"; import Card from "../components/Card"; import { gardenFilePath, GARDENS_PATH } from "../utils/mdxUtils"; import { motion } from "framer-motion"; export default function Index({ gardens }) { return (

Garden of Digital Gardens

A collection of digital gardens, tools, and resources for gardeners

{gardens.map((garden) => ( ))}
); } export function getStaticProps() { const gardens = gardenFilePath.map((filePath) => { const source = fs.readFileSync(path.join(GARDENS_PATH, filePath)); const { content, data } = matter(source); return { content, data, filePath, }; }); return { props: { gardens } }; }