Improve feeds according to W3C
This commit is contained in:
parent
d56a8cc95d
commit
c1a59ed51a
9 changed files with 137 additions and 53 deletions
|
|
@ -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})`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue