By default, CloudCannon automatically detect the output URLs for your files and assigns them at build time. This is useful as you do not need to manually assign output URLs to each of your files.
However, this behavior may not be right for your Site if it has a larger number of files or custom Site configuration. For these Sites, CloudCannon's URLs assigning behavior may slow down your build time. For these Sites, you can disable automatic output URLs in CloudCannon and manually configure your output URLs.
Before disabling CloudCannon's automatic URL detection, you must configure the collections_config.[*].url key for all output Collections.
To manually configure your URLs:
- Navigate to the editing page under Site Settings.
- Click on the Edit your configuration file button to open your CloudCannon configuration file.
- Navigate to the Collections array under the Collections and Paths section.
- Click on each output Collections in the Collections array and ensure you have configured the URL key for each Collection.
- When you are happy with your manually configured URLs for each output Collection, navigate to the Build Configuration page under Site Settings.
- Check the Manually Configure URLs flag under Build system options.
- Click the Update Configuration and Build button.
CloudCannon will immediately build your Site using the manually configured URLs.
If you would prefer to configure the output URLs for your Collections in the Source Editor or your local development environment, you can achieve the same configuration with the following code:
With automatic URL detection disabled, CloudCannon will use the explicitly configured output URL /travel/[slug].html
for files in this Collection.
With automatic URL detection disabled, CloudCannon will use the explicitly configured output URL /travel/[slug].html
for files in this Collection.