gmitohtml-upstream/CONFIGURATION.md

54 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2020-11-24 18:29:57 +01:00
`gmitohtml` loads its configuration from `~/.config/gmitohtml/config.yaml` by
default. You may specify a different location via the `--config` argument.
# Configuration options
2020-11-27 05:43:03 +01:00
## Bookmarks
Bookmarks are defined as a list of URLs and corresponding label.
Defining bookmarks manually via configuration file is possible, however it is
not required as the gmitohtml configuration file is updated when bookmarks are
modified using the web interface.
2020-11-24 18:29:57 +01:00
## Client certificates
Client certificates may be specified via the `Certs` option.
To generate a client certificate, run the following:
```bash
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
```
Files `localhost.crt` and `localhost.key` are generated. Rename these files to
match the domain where the certificate will be used.
2020-11-25 03:18:16 +01:00
## Allow file:// access
By default, local files are not served by gmitohtml. When executed with the
`--allow-file` argument, local files may be accessed via `file://`.
For example, to view `/home/dioscuri/sites/gemlog/index.gmi`, navigate to
`file:///home/dioscuri/sites/gemlog/index.gmi`.
2020-11-24 18:29:57 +01:00
# Example config.yaml
```yaml
2020-11-27 05:43:03 +01:00
bookmarks:
gemini://gemini.circumlunar.space/: Gemini protocol
gemini://gus.guru/: GUS - Gemini Universal Search
2020-11-24 18:29:57 +01:00
certs:
astrobotany.mozz.us:
cert: /home/dioscuri/.config/gmitohtml/astrobotany.mozz.us.crt
key: /home/dioscuri/.config/gmitohtml/astrobotany.mozz.us.crt
gemini.rocks:
cert: /home/dioscuri/.config/gmitohtml/gemini.rocks.crt
key: /home/dioscuri/.config/gmitohtml/gemini.rocks.key
```