Files
static-web-server/docs/content/features/multiple-index-files.md
Matthias Schoettle dd43d06551 refactor: format check support Markdown files via mdformat (#597)
* chore: format Markdown files with mdformat
* chore: switch to mdformat config file
* chore: add missing trailing slash
* docs: add section about formatting Markdown files
2025-12-07 10:40:21 +01:00

704 B
Raw Blame History

Multiple index files

SWS allows to provide a list of files that will be used as an index for requests ending with the slash character (/).

!!! info "Notes"

- Files are checked in the specified order from left to right.
- The option value can be a single index or comma-separated when multiple values.
- The default value is `index.html`.

This feature is disabled by default and can be controlled by the string list --index-files option or the equivalent SERVER_INDEX_FILES env.

Here is an example:

static-web-server -p 8787 -d ./public \
    --index-files="index.html, index.htm, default.html"