add @user
This commit is contained in:
@@ -801,12 +801,20 @@ async function generate() {
|
||||
console.log('Generated: /app.html')
|
||||
|
||||
// Generate _redirects for Cloudflare Pages (SPA routes)
|
||||
const redirects = `/app / 301
|
||||
/oauth/* /app.html 200
|
||||
// Static files (index.html, post/*/index.html) are served automatically
|
||||
// Dynamic routes are rewritten to app.html
|
||||
const redirects = `/oauth/* /app.html 200
|
||||
/at/* /app.html 200
|
||||
/new /app.html 200
|
||||
/app /app.html 200
|
||||
`
|
||||
fs.writeFileSync(path.join(distDir, '_redirects'), redirects)
|
||||
console.log('Generated: /_redirects')
|
||||
|
||||
// Generate 404.html as SPA fallback for unmatched routes (like /@handle)
|
||||
fs.writeFileSync(path.join(distDir, '404.html'), spaHtml)
|
||||
console.log('Generated: /404.html')
|
||||
|
||||
// Copy static files
|
||||
const filesToCopy = ['favicon.png', 'favicon.svg', 'config.json', 'networks.json', 'client-metadata.json', 'links.json']
|
||||
for (const file of filesToCopy) {
|
||||
|
||||
Reference in New Issue
Block a user