mirror of
https://github.com/andwati/andwati.com.git
synced 2026-10-31 06:42:16 +00:00
Replace Astro/Strapi site with Next.js static export
- Fresh structure: Next.js App Router + Tailwind v4 at the repo root, exported as static files (output: export) and served by static-web-server - Remove the Strapi CMS, Astro app, Pagefind search, comments, old scripts, Lighthouse config and compose files; content in content/ is now plain markdown with YAML frontmatter - Pages: About, Writing, Reading (3D bookshelf) and Portfolio, styled after adammaj.com - SEO: metadata and canonicals, JSON-LD, generated OG images, sitemap, robots, RSS and JSON feeds, llms.txt - Umami via PUBLIC_UMAMI_SCRIPT_URL / PUBLIC_UMAMI_WEBSITE_ID (build args) - Dockerfile builds the export and serves it with sws.toml (security headers, clean URLs, .well-known, OG image content type, immutable asset caching) - Prettier and cspell for content with a husky/lint-staged pre-commit hook - Old redirect list dropped to start from a clean slate
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { getFeedItems } from "@/lib/feed";
|
||||
import { abs, site } from "@/lib/site";
|
||||
|
||||
export const dynamic = "force-static";
|
||||
|
||||
export async function GET() {
|
||||
const items = await getFeedItems();
|
||||
const feed = {
|
||||
version: "https://jsonfeed.org/version/1.1",
|
||||
title: site.name,
|
||||
home_page_url: site.baseUrl,
|
||||
feed_url: abs("/feed.json"),
|
||||
description: site.description,
|
||||
language: "en",
|
||||
authors: [{ name: site.name, url: site.baseUrl }],
|
||||
items: items.map((i) => ({
|
||||
id: i.url,
|
||||
url: i.url,
|
||||
title: i.title,
|
||||
summary: i.description,
|
||||
content_html: i.html,
|
||||
date_published: i.date.toISOString(),
|
||||
tags: i.tags,
|
||||
})),
|
||||
};
|
||||
return new Response(JSON.stringify(feed), {
|
||||
headers: { "Content-Type": "application/feed+json; charset=utf-8" },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user