All Posts
{collection.start + 1}–{collection.end + 1} of {collection.total}{collection.data.map((post) =>
---
import MainHead from '../components/MainHead.astro';
import Nav from '../components/Nav.astro';
import PostPreview from '../components/PostPreview.astro';
import Pagination from '../components/Pagination.astro';
// page
let title = 'Muppet Blog: Home';
let description = 'An example blog on Astro';
// collection
import authorData from '../data/authors.json';
export let collection: any;
export async function createCollection() {
return {
async data() {
let allPosts = Astro.fetchContent('./post/*.md');
allPosts.sort((a, b) => new Date(b.date) - new Date(a.date));
return allPosts;
},
pageSize: 3,
rss: {
title: 'Muppet Blog',
description: 'An example blog on Astro',
customData: `