Set the base path configuration option using an environment variable #248
Closed
HCl-not-HCi
started this conversation in
Proposal
Replies: 1 comment
-
|
For anyone looking for a resolution to this question, it seems to be possible now and is documented here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is a
baseoption in theastro.config.mjsfile to configure the base path of the website (e.g./my-path/to deploy underexample.com/my-path/). In my case, I had to deploy the page in different environments with different paths. Meaning, I have to create a dedicated config file for each path.First, I expected the possibility to configure the path by using an environment variable (since the base URL gets exported to the
import.meta.env.BASE_URLenv variable). However, this is not possible.Therefore, I wish there would be the possiblity to configure the
baseconfig option using an environment variable. This could be extended to support other options as well (where it makes sense) to be fully flexible when buidling and deploying a website.In already started a discussion about this on Discord, but we did not come to a solution:
https://discord.com/channels/830184174198718474/845451724738265138/998514489710358568
Beta Was this translation helpful? Give feedback.
All reactions