You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Include all files from the `assets` directory except `temp.txt`
41
41
- Compress them using `gzip` and `zstd` (if beneficial)
42
42
- For only files in `assets/immutable`, add a `Cache-Control` header with `public, max-age=31536000, immutable` (since these are marked as cache-busted paths)
43
43
- Generate a `static_router()` function to serve these assets
@@ -52,6 +52,8 @@ This will:
52
52
53
53
-`ignore_dirs = ["my_ignore_dir", "other_ignore_dir"]` - a bracketed list of `&str`s of the paths/subdirectories inside the target directory, which should be ignored and not included. (If this parameter is missing, no subdirectories will be ignored)
54
54
55
+
-`ignore_files = ["my_ignore_file.txt", "other_ignore_file.js"]` - a bracketed list of `&str`s of the specific files inside the target directory, which should be ignored and not included. (If this parameter is missing, no files will be ignored)
56
+
55
57
-`strip_html_ext = false` - strips the `.html` or `.htm` from all HTML files included. If the filename is `index.html` or `index.htm`, the `index` part will also be removed, leaving just the root (defaults to false)
56
58
57
59
-`cache_busted_paths = ["my_immutables_dir", "my_immutable_file"]` - a bracketed list of `&str`s of the subdirectories and/or single files which should gain the `Cache-Control` header with `public, max-age=31536000, immutable` for cache-busted paths. If this parameter is missing, the default is that no embedded files will have the `Cache-Control` header. Note: the files in `cache_busted_paths` need to already be compatible with cache-busting by having hashes in their file paths (for example). All `static-serve` does is set the appropriate header.
0 commit comments