Skip to content

Commit

Permalink
fix: sitemap generation (#901)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuhito committed Dec 9, 2023
1 parent 03130ba commit a96f31e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions website/app/routes/[sitemap.xml].tsx
@@ -1,5 +1,3 @@


import type { LoaderFunction } from '@remix-run/node';
import path from 'pathe';
import { SitemapStream, streamToPromise } from 'sitemap';
Expand All @@ -14,7 +12,7 @@ export const loader: LoaderFunction = async () => {

// Pipe each font to stream
const fontlist: Record<string, string> = await kya(
'https://api.fontsource.org/fontlist?family'
'https://api.fontsource.org/fontlist?family',
);

for (const id of Object.keys(fontlist)) {
Expand All @@ -26,8 +24,7 @@ export const loader: LoaderFunction = async () => {
}

// Pipe all docs to stream
// eslint-disable-next-line unicorn/prefer-module
const slugs = await getAllSlugsInDir(path.join(__dirname+ '../docs'));
const slugs = await getAllSlugsInDir(path.join(process.cwd(), 'docs'));

for (const slug of slugs) {
smStream.write({
Expand Down

0 comments on commit a96f31e

Please sign in to comment.