I currently have a website that has only one language (English). I do however want my URLs to be prefixed by /en/. Is this supported? I have tried a few combinations of contentDir (content/en, content/) but none of them seem to work. If I define only one language in config.toml, I get a 404 on any url under root/en/*
This would not be an issue if images were either page resources or global resources, accessed directly or through an image render hook. However, depending on the size of your project, making these changes may require considerable effort.
How about this instead?
Define two languages in site configuration
Do not create any content for the second language
Override the the built-in sitemapindex.xml template to include only one language (see docs)
Override any other template code that renders alternate language links (language switchers, meta tags, etc.).
When you ultimately add a second language, revert #3 and #4.