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"; const tools = [ { title: "Roam Research", description: "A personal notes system for interconnected thought", url: "https://roamresearch.com/", }, { title: "Roam Garden", description: "Allows you to turn a Roam Research graph into a public website", url: "https://roam.garden/", }, { title: "Gatsby Theme Garden", description: "Gatsby theme that supports using Roam as a source", url: "https://github.com/mathieudutour/gatsby-digital-garden/", }, ]; export default function Index({ gardens }) { return (

Garden of Digital Gardens

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

{gardens.slice(0, 7).map((garden) => ( ))}
  • View all gardens
  • {tools.slice(0, 7).map((tool) => (

    {tool.title}

    {tool.description}

    ))}
    ); } 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 } }; }