satnaing / astro-paper

A minimal, accessible and SEO-friendly Astro blog theme
https://astro-paper.pages.dev/
MIT License
2.13k stars 440 forks source link

How to place astro-paper in a subdirectory of the website #253

Open johanazhu opened 5 months ago

johanazhu commented 5 months ago

Hello, I have a confusion. After I deploy astro-paper to vercel, I want to put the website under xxx.com/blog. When I set it in next.config.js of xxx.com

 async rewrites() {
    return [
      {
        source: '/blog/:subdir*',
        destination: 'http://xxx.com/:subdir*',
      },
      {
        source: '/(.*)',
        destination: '/',
      },
    ];
  },

Style and css error reporting, click on the article, there is no prefix (/blog)

PS:I am a Chinese and my English is not very good.

benjaminrae commented 4 months ago

Have you considered using a subdomain? That would make it https://blog.xxx.com. I see that pattern a lot more and I think it will be much easier to configure