Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Issue with Sanity #21

@layout-ch

Description

@layout-ch

Hi! The integration works like a charm with Astro. Now I'm trying to do the next step which is adding a CMS so that clients can handle their multilanguage website through a Dashboard.

For this I'm trying out Sanity with has a super generous free tier. I did a small repro here with astrolicious-i18n: https://github.com/layout-ch/astro-sanity .

Sanity let you embed your cms on a route of your website, which I did on the /admin route in the astro-config :

export default defineConfig({ site: "https://test.com", output: "hybrid", adapter: vercel(), integrations: [ sanityIntegration( { projectId: "t9cmnozc", dataset: "production", useCdn: false, studioBasePath: "/admin", } ), react(), liciousI18n({ defaultLocale: "fr", locales: ["fr", "de", "en"], strategy: "prefix", sitemap: true, pages: { "a-propos": { de: "ueber-uns", en: "about-us" } } })] });

It works like intended on the dev server but when I deploy to vercel, vercel doesn't seem to like that.

I tried it out without astrolicious-i18n and it works, but once I added the integration to the project, I get a status 500 on the /admin route. Is this because of how astrolicious-i18n handles the routes? Since they are generated automatically on build time, it somehow overrides the /admin route that comes from the sanity integration? Any tips on how to make this work with a headless CMS would be amazing. Thank you in advance !

Side note : everything works when I remove i18n so it is somehow interfering somewhere....

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions