mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
update readme
This commit is contained in:
parent
c916827709
commit
f7ac1fe21b
2 changed files with 12 additions and 1 deletions
11
README.md
11
README.md
|
|
@ -43,6 +43,17 @@ All of the command-line arguments are optional. Run `agate --help` to see the d
|
|||
|
||||
When a client requests the URL `gemini://example.com/foo/bar`, Agate will respond with the file at `path/to/content/foo/bar`. If any segment of the requested path starts with a dot, agate will respond with a status code 52, even if the file does not exist (this behaviour can be disabled with `--serve-secret`). If there is a directory at that path, Agate will look for a file named `index.gmi` inside that directory. If there is no such file, but a file named `.directory-listing-ok` exists inside that directory, a basic directory listing is displayed. Files or directories whose name starts with a dot (e.g. the `.directory-listing-ok` file itself) are omitted from the list.
|
||||
|
||||
Agate will look for a file called `.lang` in the same directory as the file currently being served. If this file exists and has an entry for the current file, the respective data will be used to formulate the response header.
|
||||
The lines of the file should have this format:
|
||||
|
||||
```text
|
||||
<filename>:<metadata>
|
||||
```
|
||||
|
||||
Where `<filename>` is just a filename (not a path) of a file in the same directory, and `<metadata>` is the metadata to be stored.
|
||||
Lines that start with optional whitespace and `#` are ignored, as are lines that do not fit the above basic format.
|
||||
Both parts are stripped of any leading and/or trailing whitespace.
|
||||
|
||||
[Gemini]: https://gemini.circumlunar.space/
|
||||
[Rust]: https://www.rust-lang.org/
|
||||
[home]: gemini://gem.limpet.net/agate/
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ use std::time::SystemTime;
|
|||
///
|
||||
/// These sidecar file's lines should have the format
|
||||
/// ```text
|
||||
/// <filename>:<metadata>\n
|
||||
/// <filename>:<metadata>
|
||||
/// ```
|
||||
/// where `<filename>` is only a filename (not a path) of a file that resides
|
||||
/// in the same directory and `<metadata>` is the metadata to be stored.
|
||||
|
|
|
|||
Loading…
Reference in a new issue