Some additional features of note on SourceHut pages include:
Redirecting directory paths
Any URL which resolves to a directory will be redirected to the same URL with a trailing slash as the canonical URL.
- example.srht.site/foo => example.srht.site/foo/
The content will be served from index.html.
Subdirectory publishing
It is possible to publish updates only to a subdirectory of your site by passing the -s flag to hut(1) pages publish.
Site configuration
You can configure a few extra details about your website while publishing by
preparing a JSON configuration file to submit via hut pages publish --site-config path/to/config.json.
All fields are optional:
{
"notFound": "path/to/not-found.html",
"fileConfigs": [
{
"glob": "*.png",
"options": {
"cacheControl": "Cache-Control header to use for applicable files"
}
},
...
]
}