feat: numerous other pages
This commit is contained in:
parent
159b60b3fb
commit
ca34a11ad4
54 changed files with 1074 additions and 101 deletions
22
src/pages/feeds/json/books.json.js
Normal file
22
src/pages/feeds/json/books.json.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { generateJsonFeed } from '@utils/generateJsonFeed';
|
||||
import { fetchGlobals } from '@utils/data/globals';
|
||||
import { fetchBooks } from '@utils/data/books';
|
||||
|
||||
export async function GET() {
|
||||
const globals = await fetchGlobals();
|
||||
const books = await fetchBooks();
|
||||
|
||||
const feed = generateJsonFeed({
|
||||
permalink: "/feeds/books.json",
|
||||
title: "Books / Cory Dransfeldt",
|
||||
globals,
|
||||
data: books.feed,
|
||||
});
|
||||
|
||||
return new Response(feed, {
|
||||
status: 200,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
}
|
Reference in a new issue