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 { gardensFilePath, GARDENS_PATH } from "../utils/mdUtils"; import { motion } from "framer-motion"; export default function Index({ posts }) { return (

Garden of Digital Gardens

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

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