~ivilata/gwit-spec

c1a40f9eb03311d22da7df32040705a40fc716a3 — Ivan Vilata-i-Balaguer 10 months ago 8c4db0b
Site intros & Well-Known URI files share spec with site config file.

Be more explicit about that.
1 files changed, 3 insertions(+), 3 deletions(-)

M README.md
M README.md => README.md +3 -3
@@ 149,7 149,7 @@ A site's `_gwit` directory may also contain **site introductions**, which allow 

An introduction for a given site MUST be contained in the file `_gwit/<ID>.ini`, where `<ID>` is the identifier of the introduced site, encoded as `0x` plus the lower case hexadecimal digits of the full fingerprint of the PGP site key. Example: `_gwit/0x0123456789abcdef0123456789abcdeffedcba98.ini`.

The format of a site introduction is that of a site configuration file (see further above), with the exception that `site.<ID>.remote` becomes a mandatory value. For any given introduction to a site, its identifier MUST match with the file name `_gwit/<ID>.ini` and its section `[site "<ID>"]`.
The format and features of a site introduction file are those of a site configuration file (see further above), with the exception that `site.<ID>.remote` becomes a mandatory value. For any given introduction to a site, its identifier MUST match with the file name `_gwit/<ID>.ini` and its section `[site "<ID>"]`.

While the value of `site.<ID>.remote` may be used for retrieving the introduced site, the rest of values may be considered as mere hints (since there is no guarantee that they come from that site's author), and they SHOULD be overridden by the client with the equivalent values of the actual site configuration file, once available locally.



@@ 358,14 358,14 @@ One of gwit's goals is to make existing Web or Gemini static sites easy to publi

For a more seamless integration, one should be able to identify such a **combined site** and get the information needed to access it over gwit. However, since the `_gwit` directory is always found in the Git repository's top directory, if the site is configured to use a different root directory (i.e. `site.<ID>.root` in `_gwit/self.ini`), those files may not be available via legacy URIs.

A Well-Known URI ([RFC8615][]) MAY be used to provide such site metadata, accessible via the `/.well-known/gwit.ini` legacy URI path, i.e. `<SITE-ROOT>/.well-known/gwit.ini`. This file MUST use the same INI syntax as the site configuration file (see further above), and contain a `site.<ID>` section where `<ID>` MUST be the identifier of the site itself, with the same format as the homonymous site configuration section. Values recognized in the section are:
A Well-Known URI ([RFC8615][]) MAY be used to provide such site metadata, accessible via the `/.well-known/gwit.ini` legacy URI path, i.e. `<SITE-ROOT>/.well-known/gwit.ini`. The format and features of this file are those of a site configuration file (see further above). It MUST contain a `site.<ID>` section where `<ID>` MUST be the identifier of the site itself, with the same format as the homonymous site configuration section. Values recognized in the section are:

[RFC8615]: https://www.rfc-editor.org/rfc/rfc8615.html
    "Well-Known Uniform Resource Identifiers (URIs) (RFC 8615)"

- `remote` (multiple, mandatory): The URL of a Git remote from where the site can be retrieved; equivalent to `site.<ID>.remote` in the site configuration file.

Which is effectively a site's introduction to itself. Other sections and values SHOULD be ignored. An example of such file follows:
This file therefore contains a site's introduction to itself. Other sections and values SHOULD be ignored. An example of such file follows:

```
[site "0xfedcba98765432100123456789abcdef76543210"]