If so, maybe just update the docs to clarify it's optional, and make small modifications here and there when URL is accessed, and in e.g. the doctor code.
Feel free to close if you don't think this makes sense. I don't want to bombard with too many issues.
Summary
Make the config option (
bridgetown.config.yml
) calledurl
optional.Assumes it already isn't optional (some code seems to hint on it being optional).
Motivation
With the 12-factor principles, it's good if a site doesn't necessarily know where it's running.
It's also useful for certain cases, where a single bridgetown site is deployed at multiple domains (URLs).
Technical explanation
A quick search brought up this usage: https://github.com/bridgetownrb/bridgetown/search?q=config.url
The uses aren't that many, maybe some can be removed (e.g. printing URL on boot up), or just print it if set.
Others can raise an exception if it isn't set, for example
absolute_url
.There is also some code already treating it as optional, so maybe it is?
https://github.com/bridgetownrb/bridgetown/blob/715cf3a4460952c2f7d7a17f2bde6c2e3d36d6dd/bridgetown-core/lib/bridgetown-core/filters/url_filters.rb#L88
If so, maybe just update the docs to clarify it's optional, and make small modifications here and there when URL is accessed, and in e.g. the doctor code.
Feel free to close if you don't think this makes sense. I don't want to bombard with too many issues.