txt
formatListItem(f.date, `/txt/${f.name}`, f.name, { pinned: f.pinned })),
+ ...txtFiles.slice(0, 10).map(f => formatListItem(f.date, `/${f.name}`, f.name, { pinned: f.pinned })),
...(txtFiles.length > 10 ? [`+${txtFiles.length - 10} more`] : [])
].join('\n')} />
diff --git a/www/src/pages/random.ts b/www/src/pages/random.ts
index 5effc90..522dfdd 100644
--- a/www/src/pages/random.ts
+++ b/www/src/pages/random.ts
@@ -13,7 +13,7 @@ export async function GET(context: APIContext) {
const urls = [
...posts.map(post => `/md/${getSlug(post.id)}`),
- ...txtFiles.map(txt => `/txt/${txt}`),
+ ...txtFiles.map(txt => `/${txt}`),
...bookmarks.map(b => b.data.url),
];
diff --git a/www/src/pages/sitemap.txt.ts b/www/src/pages/sitemap.txt.ts
index ac8cfa8..e961db6 100644
--- a/www/src/pages/sitemap.txt.ts
+++ b/www/src/pages/sitemap.txt.ts
@@ -17,7 +17,7 @@ export async function GET(context: APIContext) {
'/md',
...posts.map(post => `/md/${getSlug(post.id)}`),
'/txt',
- ...txtFiles.map(txt => `/txt/${txt}`),
+ ...txtFiles.map(txt => `/${txt}`),
'/bookmarks',
'/guestbook',
].map(p => `${site}${p}`);
diff --git a/www/src/pages/txt/index.astro b/www/src/pages/txt/index.astro
index fd98e29..4b55aa7 100644
--- a/www/src/pages/txt/index.astro
+++ b/www/src/pages/txt/index.astro
@@ -9,6 +9,6 @@ const txtFiles = getTxtFiles();
txt
- formatListItem(f.date, `/txt/${f.name}`, f.name, { pinned: f.pinned })).join('\n')} />
+ formatListItem(f.date, `/${f.name}`, f.name, { pinned: f.pinned })).join('\n')} />
diff --git a/www/vercel.json b/www/vercel.json
index f796588..ff19401 100644
--- a/www/vercel.json
+++ b/www/vercel.json
@@ -1,5 +1,8 @@
{
"installCommand": "../install.sh",
"buildCommand": "pnpm --filter @ily/www build",
- "outputDirectory": "dist"
+ "outputDirectory": "dist",
+ "redirects": [
+ { "source": "/txt/now.txt", "destination": "/now.txt", "permanent": true }
+ ]
}