Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite Support #236

Open
ccorda opened this issue Oct 5, 2022 · 0 comments
Open

Multisite Support #236

ccorda opened this issue Oct 5, 2022 · 0 comments
Assignees

Comments

@ccorda
Copy link
Contributor

ccorda commented Oct 5, 2022

The current version of Bubs assumes all variables will be passed in as ENV variables. We've recently had a good deal of experience with using middleware hostname rewrites, and would like to support this first party in bubs-next.

A getSettings function that can either retrieve values from ENV vars, or using a hostname based lookup (and then passing those variables around) would allow us to have a common code for any calls that use these settings (client and server-side graphql), cache purging and other API routes, etc.

Also docs, docker.

Pieces of code that need to be handled:

  • In getStaticPaths, we build each site. That needs to become an include so that we can custom per site and not have to update ..slug.js (see also Static generation paths #175)
  • Our various api routes use getSettings, and check the headers. this needs to be abstracted, so that we can have preview.js for example be constant regardless of env vars or constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant