Improve feeds according to W3C

This commit is contained in:
Bad Manners 2024-09-15 16:54:28 -03:00
parent d56a8cc95d
commit c1a59ed51a
No known key found for this signature in database
GPG key ID: 8C88292CCB075609
9 changed files with 137 additions and 53 deletions

View file

@ -83,7 +83,7 @@ async function exportStory(slug: string, options: { outputDir: string }) {
lines.on("close", reject);
});
console.log(`Astro listening on ${astroURL}`);
const response = await fetchRetry(new URL(`/api/healthcheck`, astroURL), { retries: 5, retryDelay: 2000 });
const response = await fetchRetry(new URL(`api/healthcheck`, astroURL), { retries: 5, retryDelay: 2000 });
if (!response.ok) {
throw new Error(response.statusText);
}
@ -103,7 +103,7 @@ async function exportStory(slug: string, options: { outputDir: string }) {
let storyText = "";
try {
console.log("Getting data from Astro...");
const response = await fetch(new URL(`/api/export-story/${slug}`, astroURL));
const response = await fetch(new URL(`api/export-story/${slug}`, astroURL));
if (!response.ok) {
throw new Error(`Failed to reach export-story API (status code ${response.status})`);
}