X-Git-Url: https://git.ladys.computer/x_status_git/blobdiff_plain/8e2067811887c23a4b41beae30f6f7cca9465a08..760145cc6cea91fe442ac247c0d947b455320276:/README.markdown diff --git a/README.markdown b/README.markdown index 31f9ac5..a03f40a 100644 --- a/README.markdown +++ b/README.markdown @@ -1,6 +1,6 @@ -# Status.git +# x_status_git -A minimal git‐based self‐hosted status publishing solution. +A minimal git‐based microblog. ## What It Is @@ -71,7 +71,9 @@ You’ll need to supply some variables there, too :— ## Server Configuration Your server should be configured to serve the following files from the - provided `PUBLIC_DIRECTORY` in response to the following requests :— + provided `PUBLIC_DIRECTORY` in response to the following requests. +For people using Caddy to serve their content, a sample `Caddyfile` is + included in this repository. ### H·T·M·L responses @@ -81,6 +83,15 @@ Note that these paths **do not** have a trailing slash. + **`GET /`**: Serve the file at `/index.html`. + A `Link` header with the value + `;rel=meta;type="application/ld+json"` (or + equivalent) **must** be provided. + + + **`GET /about`**: + Serve the file at `/.about.html`. + A `Link` header with the value + `;rel=meta;type="application/ld+json"` (or + equivalent) **must** be provided. + **`GET /statuses`**: Serve the file at `/.statuses.html`. @@ -88,13 +99,13 @@ Note that these paths **do not** have a trailing slash. `;rel=meta;type="application/ld+json"` (or equivalent) **must** be provided. - + **`GET /$YYYY-MM`** (where `$YYYY-MM` is an `xsd:gYearMonth`): + + **`GET /statuses/$YYYY-MM`** (where `$YYYY-MM` is an `xsd:gYearMonth`): Serve the file at `/.topic.html`. A `Link` header with the value `;rel=meta;type="application/ld+json"` (or equivalent) **must** be provided. - + **`GET /$YYYY-MM/*`** (where `$YYYY-MM` is an `xsd:gYearMonth`): + + **`GET /statuses/$YYYY-MM/*`** (where `$YYYY-MM` is an `xsd:gYearMonth`): Serve the file at `/.status.html`. A `Link` header with the value `;rel=meta;type="application/ld+json"` (or @@ -126,10 +137,13 @@ These responses **should** be served with a `Content-Type` of In all cases, for `/$PATH.jsonld`, this just serves the file at `/$PATH/index.jsonld`. + + **`GET /about.jsonld`**: + Serve the file at `/about/index.jsonld`. + + **`GET /statuses.jsonld`**: Serve the file at `/statuses/index.jsonld`. - + **`GET /$YYYY-MM.jsonld`** (where `$YYYY-MM` is an + + **`GET /statuses/$YYYY-MM.jsonld`** (where `$YYYY-MM` is an `xsd:gYearMonth`): Serve the file at `/$YYYY-MM/index.jsonld`. @@ -140,6 +154,24 @@ In all cases, for `/$PATH.jsonld`, this just serves the file at `[0-9A-Za-z_-]+`): Serve the file at `/topics/$TOPIC/index.jsonld`. +### Atom responses + +These responses **should** be served with a `Content-Type` of + `application/atom+xml`. +In all cases, for `/$PATH.atom`, this just serves the file at + `/$PATH/index.atom`. + + + **`GET /statuses.atom`**: + Serve the file at `/statuses/index.atom`. + + + **`GET /statuses/$YYYY-MM.atom`** (where `$YYYY-MM` is an + `xsd:gYearMonth`): + Serve the file at `/$YYYY-MM/index.atom`. + + + **`GET /topics/$TOPIC.atom`** (where `$TOPIC` matches + `[0-9A-Za-z_-]+`): + Serve the file at `/topics/$TOPIC/index.atom`. + ### Other Headers All responses **should** have a `Access-Control-Allow-Origin` header @@ -195,6 +227,13 @@ The files which represent a status are as follows :— The contents of this file **must** give the author’s URL, optionally followed by a trailing newline. + + **`2=TITLE`** (where `TITLE` might be anything): + This file is **optional** and indicates the title of the status. + The value of `TITLE` **should** be a file·system‐friendly version + of the title, but is ignored. + The contents of this file **must** give the title of the status, + optionally followed by a trailing newline. + + **`3=YYYY-MM-DD`** (where `YYYY-MM-DD` is a date): This file is **required** and indicates the date of the status. Only one date is currently supported. @@ -219,7 +258,7 @@ The files which represent a status are as follows :— Files with names that begin with the strings `2=` or `x_status_git_` are reserved for backwards‐compatible extensions. -Status.git has no opinion on how these files make their way into the +x_status_git has no opinion on how these files make their way into the Git repository, except that all the files for a single status should be added in the same commit. The intention is that the simple nature of these files will make them @@ -228,7 +267,7 @@ The intention is that the simple nature of these files will make them ## I Am Computer, How Do I Get Status? Assume you are given a U·R·L `resource_url` which you think points to - some kind of Status.git resource. + some kind of x_status_git resource. Start by resolving it as follows :— 01. Make a `HEAD` request to `resource_url`. @@ -280,21 +319,27 @@ Assuming the U·R·L you were given was valid, you will end this + If the `@type` is or contains `Thread`, the resource is a collection of statuses. -The items in the collection may be determined through one of the - following methods :— + + If the `@type` is or contains `Microblog`, the resource describes + this site as a whole. + The `streams` property will contain a list of available `Forum`s + and `Thread`s, as objects with an `@id` and `@type`. - + If the `@type` is or contains `OrderedCollectionPage`, then its - `items` will be an array of resources. +The items in the collection (`Forum` or `Thread`) may be determined + through one of the following methods :— + + + If the `@type` is or contains `CollectionPage` or + `OrderedCollectionPage`, then its `items` will contain resources. This is a partial collection, and the `prev` and `next` properties can be used to access further items from the parent collection (indicated by `partOf`). + `first` and `current`, in this scenario, point “horizontally” to + the first and latest pages of items, not to subpages. - + If the `@type` is or contains `OrderedCollection`, and the resource - has `first` and `current` properties, then the `items` property - will not be present. + + If the `@type` is or contains `Collection` or `OrderedCollection` + and the resource has `first` and/or `current` properties, then + the `items` property will not be present. `first` and `current` can be accessed to provide - `OrderedCollectionPage`s listing the items of the collection as - above. + `OrderedCollectionPage`s listing the items of the collection. + Otherwise, the `items` property will contain every item in the collection. @@ -322,5 +367,8 @@ Statuses themselves have the following properties :— + **`subject`** [`dcterms:subject`] (optional): The topic of the status, for topic statuses. + + **`title`** [`dcterms:title`] (optional): + The title of the status. + + **`content`** [`sioc:content`]: The content of the status, as an `rdf:XMLLiteral`.