Document optional parameters

Evgeny PisemskyThu Aug 29 12:30:41+0300 2024

271be88

Document optional parameters

README.md

4949
(config
5050
  (port 8080)
5151
  (host "localhost")
52-
  (database "")
52+
  (database ((asset-directory . #f)
53+
             (avatar-url-template . "https://avatar.lepiller.eu/cat-avatar-generator.php?seed=$hash")
54+
             (avatar-hash-algorithm . sha1)))
5355
  (repositories "/srv/git")
5456
  (base-git-url "https://git.example.org/git")
5557
  (index-title "My projects")

5961
6062
* port: the port on which to listen
6163
* host: the host on which to listen
62-
* database: currently unused
64+
* database: currently abused to set additional optional parameters
6365
* repositories: The directory in which public repositories can be found
6466
* base-git-url: The base url for cloning repositories
6567
* index-title: The title for the index page

6870
* footer: The content of the footer text on all pages. It is also a list of
6971
  sxml expressions.
7072
73+
Database can be set to an alist of the following keys and values:
74+
75+
* asset-directory: the string with a full path to the static asset
76+
  directory of gitile to serve them for development or the #f value to
77+
  disable this feature.
78+
* avatar-url-template: the string containing an avatar generator url
79+
  template where the string $hash is replaced with commit email hash.
80+
* avatar-hash-algorithm: the symbol of a gcrypt hash algorithm used
81+
  for computing commit email hash.
82+
83+
The config example above represents the default values for these keys.
84+
7185
Save the file as `gitile.conf` (or whatever name you like) and run gitile with
7286
7387
```bash