73 lines
3.1 KiB
Markdown
73 lines
3.1 KiB
Markdown
# Configuration
|
|
|
|
the configuration format, with defaults, is documented below:
|
|
|
|
```toml
|
|
title = "bingus-blog" # title of the blog
|
|
# description of the blog
|
|
description = "blazingly fast blog software written in rust memory safe"
|
|
raw_access = true # allow users to see the raw source of a post
|
|
js_enable = true # enable javascript (required for sorting and dates)
|
|
engine = "markdown" # choose which post engine to use
|
|
# options: "markdown", "blag"
|
|
# absolutely do not use "blag" unless you know exactly
|
|
# what you are getting yourself into.
|
|
|
|
[style]
|
|
date_format = "RFC3339" # format string used to format dates in the backend
|
|
# it's highly recommended to leave this as default,
|
|
# so the date can be formatted by the browser.
|
|
# format: https://docs.rs/chrono/latest/chrono/format/strftime/index.html#specifiers
|
|
default_sort = "date" # default sorting method ("date" or "name")
|
|
#default_color = "#f5c2e7" # default embed color, optional
|
|
|
|
[style.display_dates]
|
|
creation = true # display creation ("written") dates
|
|
modification = true # display modified ("last modified") dates
|
|
|
|
[rss]
|
|
enable = false # serve an rss field under /feed.xml
|
|
# this may be a bit resource intensive
|
|
link = "https://..." # public url of the blog, required if rss is enabled
|
|
|
|
[dirs]
|
|
posts = "posts" # where posts are stored
|
|
media = "media" # directory served under /media/
|
|
custom_templates = "templates" # custom templates dir
|
|
custom_static = "static" # custom static dir
|
|
# see CUSTOM.md for documentation
|
|
[http]
|
|
host = "::" # ip to listen on
|
|
port = 3000 # port to listen on
|
|
|
|
[cache]
|
|
enable = true # save metadata and rendered posts into RAM
|
|
# highly recommended, only turn off if absolutely necessary
|
|
cleanup = true # clean cache, highly recommended
|
|
#cleanup_interval = 86400000 # clean the cache regularly instead of just at startup
|
|
# uncomment to enable
|
|
persistence = true # save the cache to on shutdown and load on startup
|
|
file = "cache" # file to save the cache to
|
|
compress = true # compress the cache file
|
|
compression_level = 3 # zstd compression level, 3 is recommended
|
|
|
|
[render]
|
|
syntect.load_defaults = false # include default syntect themes
|
|
syntect.themes_dir = "themes" # directory to include themes from
|
|
syntect.theme = "Catppuccin Mocha" # theme file name (without `.tmTheme`)
|
|
|
|
[blag]
|
|
bin = "blag" # path to blag binary
|
|
```
|
|
|
|
configuration is done in [TOML](https://toml.io/)
|
|
if an option marked "optional" is not set, it will not be initialized with
|
|
a default value
|
|
you don't have to copy the whole thing from here,
|
|
it's generated by the program if it doesn't exist
|
|
|
|
## Specifying the configuration file
|
|
|
|
the configuration file is loaded from `config.toml` by default, but the path
|
|
can be overriden by setting the environment variable `BINGUS_BLOG_CONFIG`,
|
|
which will make bingus-blog try to read that file or fail and exit.
|