Add section on MIME types to README

This commit is contained in:
Anthony J. Martinez 2023-06-26 12:12:52 -05:00
parent ffa8db39a6
commit 6f2b8c9cca
Signed by: ajmartinez
1 changed files with 23 additions and 6 deletions

View File

@ -19,13 +19,13 @@ and flexible base for serving sites using:
$ arse new
2021-05-01T17:34:11.155427589+00:00 [INFO] Logging started
2021-05-01T17:34:11.155543182+00:00 [INFO] Generating new site configuration
Please enter a name for the site:
Please enter a name for the site:
Example Site
Please enter the site author's name:
Please enter the site author's name:
Arthur Writeson
Please enter the base URL for your site:
Please enter comma-separated site topics:
Please enter comma-separated site topics:
one, two, three
2021-05-01T17:34:26.501980660+00:00 [INFO] Creating site filesystem tree
2021-05-01T17:34:26.504816188+00:00 [INFO] Writing site configuration to disk
@ -42,9 +42,9 @@ author = 'Arthur Writeson'
url = ''
template = 'default.tmpl'
topics = [
@ -54,6 +54,11 @@ port = 9090
templates = '/home/user/site/templates'
webroot = '/home/user/site/webroot'
css = "text/css"
gif = "image/gif"
jpg = "image/jpeg"
#### Rendering and Styling
@ -84,6 +89,18 @@ The following elements are available within the Tera context for rendering:
* A simple image slideshow will be generated for `/gallery/ext/*.jpg`
* Display will follow the same lexical reverse order as posts.
#### MIME types
Version `0.16.0` added a `mime_types` section to the `config.toml` file. This is created with a minimal set of
mappings from a file extension to the desired MIME type. These mappings are used when serving files from:
- `static/`
- `:topic/ext/`
If there is no match for the extension, or the file lacks an extension entirely, the default is `text/plain`.
As such, if you wish for maximimum compatibility with different reverse proxies, browsers, or other applications
it is crticial that you set an appropriate MIME type for each possible extension you intend to serve directly.
## Path to 1.0
- [x] Dynamic route handling