~ivilata/gwit-spec

d472fe34ef8de319225f77f6e7646035443e31f9 — Ivan Vilata-i-Balaguer 3 months ago 7bdf35a
Refer to the SPDX license list as a hint for `site.<ID>.license`.

And update example accordingly.
1 files changed, 5 insertions(+), 2 deletions(-)

M README.md
M README.md => README.md +5 -2
@@ 107,12 107,15 @@ The `site.<ID>` section of `_gwit/self.ini` contains some basic information abou
- `title-<LANGUAGE>` (single, optional): A language-specific title for the site, with the same characteristics as `title`. `<LANGUAGE>` MUST be a two-letter ISO 639-1 language code. Example for `title-fr` (French): "Le Bar de Foo : le Bar pour tous vos Foos".
- `desc` (single, optional): A longer text (in an unspecified language) describing the site, maybe over several lines or paragraphs.
- `desc-<LANGUAGE>` (single, optional): A language-specific description for the site, with the same characteristics as `desc`. `<LANGUAGE>` MUST be a two-letter ISO 639-1 language code.
- `license` (single, recommended): A short text hinting about the legal terms of use for the site, if meaningful. It MUST NOT contain newline characters. Example: "CC-BY" (meaning "Creative Commons Attribution").
- `license` (single, recommended): A short text hinting about the legal terms of use for the site, if meaningful. It MUST NOT contain newline characters. Example: "CC-BY-4.0" (meaning "Creative Commons Attribution 4.0 International" as per the [SPDX License List][spdx-licenses]).
- `root` (single, optional): A directory to be used as the site's **root directory** instead of, and relative to, the commit's top directory. If missing, it defaults to that top directory. It MUST consist of one or more non-empty path components separated by a single forward slash (`/`). It MUST NOT contain `.` or `..` path components. Convenient when using a static site generator that writes its output to a directory. Example (for a site containing Gemini files): `output`.
- `index` (single, optional): The name of the **index file**. It MUST NOT be empty, `.` or `..`, or contain slash characters (`/`). When a gwit client is told to retrieve a directory, and it contains a file named as the index file, the contents of the file SHOULD be produced instead of a directory listing. Example (for a site containing Gemini files): `index.gmi`.
- `remote` (multiple, recommended): A location recommended by the author for retrieving the site, the URL of a Git remote. Multiple such locations may be given (for increased availability), each as a different `remote` value, which a client MAY consider in order of appearance. Example: `https://git.example.net/foo/bar-site.git`.
- `alt` (multiple, optional): If given, the prefix for this site's URIs in a publication system other than gwit. The gwit client MAY interpret links in this site using those prefixes as if they began with a single slash (`/`) instead of the prefix and subsequent slashes. This enables reusing site contents in gwit without needing to adapt local absolute links. Multiple such prefixes may be given, each as a different `alt` value. Example: `https://foo.example.net/bar/` enables rewriting `https://foo.example.net/bar//page.html` to `/page.html`.

[spdx-licenses]: https://spdx.org/licenses/
    "SPDX License List (Software Package Data Exchange)"

The scope of the different site configuration values is described below:

- `site.<ID>.name`: The value in the latest site version, if defined, SHOULD be read on initial site retrieval, then applied to all versions of the site (past and future, until manually overridden).


@@ 129,7 132,7 @@ title = Foo Bar: the Bar for all your Foos
title-fr = Le Bar de Foo : le Bar pour tous vos Foos
desc = "It's the Foo Bar!\n\nFind your best Foos here."
desc-fr = "C'est le Bar de Foo !\n\nTrouvez vos meilleurs Foos ici."
license = CC-BY
license = CC-BY-4.0
root = output
index = index.gmi
remote = https://git.example.net/foo/bar-site.git