- Sort blog posts by reverse date - most recent first
- Add site map (WCAG2.2 - 2.4.5 - Multiple ways)
- Add skip to site map link in header
markdejong.org: I've rebuilt my site in Astro
folder where the blog pages and slug is generated
content config.ts GitHub for today's branch
If time / if I feel like it one or more of:
- Set up function for draft = true/false
- Tag pages
- Cards for blog posts
- figure out why LinkNav works for desktop but not tablet breakpoint
- figure out why Header centers on desktop (not desired) but not on tablet (desired)
- Fix extra menu showing in mobile - again!
import { getCollection } from "astro:content"; import Layout from "../../components/Layout.astro";
const posts = (await getCollection("project")) .sort((a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf()) .reverse();
-
{posts.map(p =>
- {post.data.title} )}