Wire Astro content collections to the shared content/ directory

Adds a custom Astro loader that reads the Zola-style TOML frontmatter
(+++ ... +++) directly, so content/ stays the single source of truth
with no YAML conversion step. Defines writings/portfolio/bookshelf/
blogs collections and basic list/detail pages for each, rendering the
seed entries end-to-end (verified in-browser via `pnpm --filter site
dev`). This is the first runnable MVP: home, writings list + post
detail, portfolio, bookshelf (books and papers), and curated blogs
all render from real content/ files.
This commit is contained in:
2026-08-30 18:14:34 +03:00
parent cae62d4a66
commit 16c8dff5d5
13 changed files with 383 additions and 18 deletions
+62
View File
@@ -0,0 +1,62 @@
---
interface Props {
title: string;
}
const { title } = Astro.props;
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{title} — andwati.com</title>
<style>
:root {
color-scheme: light dark;
}
body {
font-family: system-ui, sans-serif;
max-width: 42rem;
margin: 2rem auto;
padding: 0 1rem;
line-height: 1.6;
}
nav {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
font-size: 0.9rem;
}
.tag {
display: inline-block;
font-size: 0.8rem;
opacity: 0.7;
margin-right: 0.5rem;
}
.card {
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.card h3 {
margin-bottom: 0.25rem;
}
.meta {
font-size: 0.85rem;
opacity: 0.7;
}
</style>
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/writings/">Writings</a>
<a href="/portfolio/">Portfolio</a>
<a href="/bookshelf/">Bookshelf</a>
<a href="/blogs/">Blogs</a>
</nav>
<main>
<slot />
</main>
</body>
</html>