-
{guides.map((post) => {
return
- {post.title} ; })}
--- import Card from '../components/Card.jsx'; import BaseHead from '../components/BaseHead.astro'; import MainLayout from '../components/MainLayout.astro'; // mocked for now, to be added later // 1. import {paginate} from 'magicthing'; // 2. export default function ({paginate}) { function paginate(options) { if (options.tag === 'guide') { return [ { title: 'Test guide 1', href: "#" }, { title: 'Test guide 2', href: "#" }, ]; } if (options.tag === 'communityGuides') { return [{ title: 'Test communityGuides', href: "#" }]; } return []; } let title = 'Guides'; let description = 'Snowpack\'s usage and integration guides.'; let guides; let communityGuides; guides = paginate({ files: '/posts/guides/*.md', // sort: ((a, b) => new Date(b) - new Date(a)), tag: 'guide', limit: 10, // page: query.page, }); communityGuides = paginate({ files: '/posts/guides/*.md', // sort: ((a, b) => new Date(b) - new Date(a)), tag: 'communityGuides', limit: 10, }); ---