Extract sample configuration file
Otherwise I'll have to update the README all the time
- Id
- 229888f26c1f6f7228aa90b270c0716d432d70e0
- Author
- Caio
- Commit time
- 2024-03-10T11:05:53+01:00
Modified README.md
caca [-c /path/to/config] /path/to/gitroot
The (optional) configuration maps a gitconfig/ini file to [a GlobalConfig
-instance](caca/src/config.rs#L13). See [here](caca/src/config.rs#L448) how
-one could look like
+instance](caca/src/config.rs#L13).
+See [caio.co/de's live config](resources/caiodotco-live-config.ini) as an
+example.
You can use the `RUST_LOG` environment variable to configure logging.
The cmdline I tend to use when hacking is something like:
Modified caca/src/config.rs
#[test]
fn parse_caiodotco() {
- let live_config = r#"
-[site]
-listing-title = caio.co/de index
-listing-html-header = <h1><a class="nodec" href="..">caio.</a><strong>co/de</strong></h1>
-base-url = https://caio.co
-reverse-proxy-base = /de
-repo-to-listing-name = caio.co/de
-
-[core]
-listen = external
-global-mailmap = /etc/caca/mailmap
-static-theme = true
- "#;
+ let live_config = include_str!("../../resources/caiodotco-live-config.ini");
assert_eq!(
GlobalConfig::caiodotco(),
Created resources/caiodotco-live-config.ini
+[site]
+listing-title = caio.co/de index
+listing-html-header = <h1><a class="nodec" href="..">caio.</a><strong>co/de</strong></h1>
+base-url = https://caio.co
+reverse-proxy-base = /de
+repo-to-listing-name = caio.co/de
+
+[core]
+listen = external
+global-mailmap = /etc/caca/mailmap
+static-theme = true