update content
This commit is contained in:
parent
d22eb07a55
commit
339a4cb482
16 changed files with 166 additions and 264 deletions
|
|
@ -1,41 +0,0 @@
|
|||
import { Feed } from "feed";
|
||||
import { getArtifacts } from "utils";
|
||||
|
||||
const SITE_URL = "https://chora.io/artifacts/essays";
|
||||
|
||||
function getAllArtifacts() {
|
||||
return [
|
||||
...getArtifacts('essays'),
|
||||
]
|
||||
}
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
export async function GET() {
|
||||
const feed = new Feed({
|
||||
title: "ryan's artifacts (essays)",
|
||||
description: "ryan's artifacts (essays)",
|
||||
id: SITE_URL,
|
||||
link: SITE_URL,
|
||||
language: "en",
|
||||
feedLinks: { rss2: `${SITE_URL}/feed` },
|
||||
ttl: 60,
|
||||
});
|
||||
|
||||
for (const a of getAllArtifacts()) {
|
||||
feed.addItem({
|
||||
title: a.title,
|
||||
id: `${SITE_URL}/${a.id}`,
|
||||
link: `${SITE_URL}/${a.id}`,
|
||||
description: a.description,
|
||||
date: a.created,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(feed.rss2(), {
|
||||
headers: {
|
||||
"Content-Type": "application/rss+xml; charset=utf-8",
|
||||
"Cache-Control": "public, max-age=3600",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
import { Feed } from "feed";
|
||||
import { getArtifacts } from "utils";
|
||||
|
||||
const SITE_URL = "https://ryanchristo.com/artifacts";
|
||||
|
||||
function getAllArtifacts() {
|
||||
return [
|
||||
...getArtifacts('essays'),
|
||||
...getArtifacts('film'),
|
||||
...getArtifacts('software'),
|
||||
...getArtifacts('videos'),
|
||||
]
|
||||
}
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
export async function GET() {
|
||||
const feed = new Feed({
|
||||
title: "ryan's artifacts",
|
||||
description: "ryan's artifacts",
|
||||
id: SITE_URL,
|
||||
link: SITE_URL,
|
||||
language: "en",
|
||||
feedLinks: { rss2: `${SITE_URL}/feed` },
|
||||
ttl: 60,
|
||||
});
|
||||
|
||||
for (const a of getAllArtifacts()) {
|
||||
feed.addItem({
|
||||
title: a.title,
|
||||
id: `${SITE_URL}/${a.category}/${a.id}`,
|
||||
link: `${SITE_URL}/${a.category}/${a.id}`,
|
||||
description: a.description,
|
||||
date: a.created,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(feed.rss2(), {
|
||||
headers: {
|
||||
"Content-Type": "application/rss+xml; charset=utf-8",
|
||||
"Cache-Control": "public, max-age=3600",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import { Feed } from "feed";
|
||||
import { getArtifacts } from "utils";
|
||||
|
||||
const SITE_URL = "https://chora.io/artifacts/film";
|
||||
|
||||
function getAllArtifacts() {
|
||||
return [
|
||||
...getArtifacts('film'),
|
||||
]
|
||||
}
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
export async function GET() {
|
||||
const feed = new Feed({
|
||||
title: "ryan's artifacts (film)",
|
||||
description: "ryan's artifacts (film)",
|
||||
id: SITE_URL,
|
||||
link: SITE_URL,
|
||||
language: "en",
|
||||
feedLinks: { rss2: `${SITE_URL}/feed` },
|
||||
ttl: 60,
|
||||
});
|
||||
|
||||
for (const a of getAllArtifacts()) {
|
||||
feed.addItem({
|
||||
title: a.title,
|
||||
id: `${SITE_URL}/${a.id}`,
|
||||
link: `${SITE_URL}/${a.id}`,
|
||||
description: a.description,
|
||||
date: a.created,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(feed.rss2(), {
|
||||
headers: {
|
||||
"Content-Type": "application/rss+xml; charset=utf-8",
|
||||
"Cache-Control": "public, max-age=3600",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import { Feed } from "feed";
|
||||
import { getArtifacts } from "utils";
|
||||
|
||||
const SITE_URL = "https://chora.io/artifacts/software";
|
||||
|
||||
function getAllArtifacts() {
|
||||
return [
|
||||
...getArtifacts('software'),
|
||||
]
|
||||
}
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
export async function GET() {
|
||||
const feed = new Feed({
|
||||
title: "ryan's artifacts (software)",
|
||||
description: "ryan's artifacts (software)",
|
||||
id: SITE_URL,
|
||||
link: SITE_URL,
|
||||
language: "en",
|
||||
feedLinks: { rss2: `${SITE_URL}/feed` },
|
||||
ttl: 60,
|
||||
});
|
||||
|
||||
for (const a of getAllArtifacts()) {
|
||||
feed.addItem({
|
||||
title: a.title,
|
||||
id: `${SITE_URL}/${a.id}`,
|
||||
link: `${SITE_URL}/${a.id}`,
|
||||
description: a.description,
|
||||
date: a.created,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(feed.rss2(), {
|
||||
headers: {
|
||||
"Content-Type": "application/rss+xml; charset=utf-8",
|
||||
"Cache-Control": "public, max-age=3600",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
import { Feed } from "feed";
|
||||
import { getArtifacts } from "utils";
|
||||
|
||||
const SITE_URL = "https://chora.io/artifacts/videos";
|
||||
|
||||
function getAllArtifacts() {
|
||||
return [
|
||||
...getArtifacts('videos'),
|
||||
]
|
||||
}
|
||||
|
||||
export const revalidate = false;
|
||||
|
||||
export async function GET() {
|
||||
const feed = new Feed({
|
||||
title: "ryan's artifacts (videos)",
|
||||
description: "ryan's artifacts (videos)",
|
||||
id: SITE_URL,
|
||||
link: SITE_URL,
|
||||
language: "en",
|
||||
feedLinks: { rss2: `${SITE_URL}/feed` },
|
||||
ttl: 60,
|
||||
});
|
||||
|
||||
for (const a of getAllArtifacts()) {
|
||||
feed.addItem({
|
||||
title: a.title,
|
||||
id: `${SITE_URL}/${a.id}`,
|
||||
link: `${SITE_URL}/${a.id}`,
|
||||
description: a.description,
|
||||
date: a.created,
|
||||
});
|
||||
}
|
||||
|
||||
return new Response(feed.rss2(), {
|
||||
headers: {
|
||||
"Content-Type": "application/rss+xml; charset=utf-8",
|
||||
"Cache-Control": "public, max-age=3600",
|
||||
},
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue