Matrix Documentation (including The Spec)
Go to file
DeepBlueV7.X 843eb6d5c1
MSC2781: Remove the reply fallbacks from the specification (#2781)
* MSC2781: Down with the fallbacks

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add a note about dropping the html requirement

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add an unstable prefix for removed fallbacks.

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add a section about fallbacks not being properly specified.

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add appendix about which clients do not support replies (and why, if possible)

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Correct weechat status

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Add another alternative

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Document a few more issues with fallbacks

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Update client status, remove proposal for edits and try to turn down the language a bit

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Remove mistaken reference to the Qt renderer

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Try to make motivation a bit clearer in the proposal

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* How do anchors work?

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Drop reference to issues with edit fallbacks

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Typos

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Address review comments

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* More edits

Move edit section to a single sentence in "interaction with other
features".

Spell out why the IRC example is there.

Reword body stripping.

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Implementation traps

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Add dates to client status list

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Mention pushrules proposal in the alternatives section

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Update proposal to 2024

This also addresses several review comments from clokep and Travis.

* Be explicit about removal

* Apply suggestions from code review

Thanks dbkr, richvdh and clokep!

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update proposals/2781-down-with-the-fallbacks.md

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>

* Simplify wording around invalid html and potential issues

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

---------

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-11-05 09:23:40 -07:00
.buildkite Cut out legacy build scripts 2021-04-05 12:20:30 -06:00
.circleci Cut out legacy build scripts 2021-04-05 12:20:30 -06:00
.github Update idea.md 2021-02-23 10:28:21 -07:00
assets Rename assets-hugo directory to assets (#3259) 2022-01-06 10:34:56 +00:00
attic Move drafts to attic to reduce confusion 2021-04-05 12:13:21 -06:00
changelogs Add m.login.appservice to the spec (#3324) 2021-12-28 16:16:33 -05:00
content Add m.login.appservice to the spec (#3324) 2021-12-28 16:16:33 -05:00
data Fix two links on the CS API page 2021-08-26 14:15:58 -05:00
data-definitions Update i18n 2021-05-11 22:02:08 -06:00
informal Apply suggestions from code review 2021-05-03 19:33:15 -06:00
layouts Use `changelogs/release.yaml` for the version number source everywhere (#3310) 2021-08-10 18:05:28 +01:00
meta Update documentation_style.rst (#3352) 2021-08-19 18:38:02 +01:00
proposals MSC2781: Remove the reply fallbacks from the specification (#2781) 2024-11-05 09:23:40 -07:00
scripts dump-swagger.py: include untagged operations (#3326) 2022-01-04 11:31:09 -07:00
static Rename assets-hugo directory to assets (#3259) 2022-01-06 10:34:56 +00:00
themes Opt for serving new spec JS/CSS dependencies locally instead of downloading from CDNs (#3036) 2021-03-02 14:58:26 +00:00
.gitignore Rename assets-hugo directory to assets (#3259) 2022-01-06 10:34:56 +00:00
.gitmodules Opt for serving new spec JS/CSS dependencies locally instead of downloading from CDNs (#3036) 2021-03-02 14:58:26 +00:00
CONTRIBUTING.rst Switch code formatting note about changelogs from RST to MD (#3103) 2021-04-06 17:20:15 +01:00
LICENSE Add a license to the spec 2016-07-12 17:28:30 +01:00
README.md Notes on how to use `hugo` from docker (#3349) 2021-08-19 18:24:41 +01:00
config-circleci.toml Update CircleCI and Buildkite configs to build the new spec (#3017) 2021-03-01 10:04:06 +00:00
config.toml Rename assets-hugo directory to assets (#3259) 2022-01-06 10:34:56 +00:00
openapi_extensions.md Restore docs describing OpenAPI extensions that we use 2021-02-05 10:15:42 -08:00
package-lock.json Bump postcss from 7.0.32 to 7.0.36 2021-06-17 14:30:21 +00:00
package.json Support rendering of proposal tables 2021-02-08 15:39:16 -08:00
pyproject.toml goodbye legacy config 2021-04-06 09:45:23 -06:00

README.md

Matrix Specification

This repository contains the Matrix Specification, rendered at spec.matrix.org.

Developers looking to use Matrix should join #matrix-dev:matrix.org on Matrix for help.

Spec authors and proposal writers are welcome to join #matrix-spec:matrix.org. We welcome contributions! See CONTRIBUTING.rst for details.

Structure

The Matrix spec is compiled with Hugo (a static site generator) with the following structure:

  • /assets: assets that need postprocessing using Hugo Pipes. For example, Sass files would go here.

  • /content: files that will become pages in the site go here. Typically these are Markdown files with some YAML front matter indicating, among other things, what layout should be applied to this page. The organization of files under /content determines the organization of pages in the built site.

  • /data: this can contain TOML, YAML, or JSON files. Files kept here are directly available to template code as data objects, so templates don't need to load them from a file and parse them. This is also where our Swagger/OpenAPI definitions and schemas are.

  • /layouts: this contains Hugo templates. Some templates define the overall layout of a page: for example, whether it has header, footer, sidebar, and so on.

    • /layouts/partials: these templates can be called from other templates, so they can be used to factor out template code that's used in more than one template. An obvious example here is something like a sidebar, where several different page layouts might all include the sidebar. But also, partial templates can return values: this means they can be used like functions, that can be called by multiple templates to do some common processing.
    • /layouts/shortcodes: these templates can be called directly from files in /content.
  • /static: static files which don't need preprocessing. JS or CSS files could live here.

  • /themes: you can use just Hugo or use it with a theme. Themes primarily provide additional templates, which are supplied in a /themes/$theme_name/layouts directory. You can use a theme but customise it by providing your own versions of any of the theme layouts in the base /layouts directory. That is, if a theme provides /themes/$theme_name/layouts/sidebar.html and you provide /layouts/sidebar.html, then your version of the template will be used.

It also has the following top-level file:

  • config.toml: site-wide configuration settings. Some of these are built-in and you can add your own. Config settings defined here are available in templates. All these directories above are configurable via config.toml settings.

Additionally, the following directories may be of interest:

  • /attic: Here contains historical sections of specification and legacy drafts for the specification.
  • /changelogs: Various bits of changelog for the specification areas.
  • /data-definitions: Bits of structured data consumable by Matrix implementations.
  • /meta: Documentation relating to the spec's processes that are otherwise untracked (release instructions, etc).
  • /scripts: Various scripts for generating the spec and validating its contents.
  • /proposals: Matrix Spec Change (MSC) proposals. See https://spec.matrix.org/unstable/proposals/.

Authoring changes to the spec

Please read CONTRIBUTING.rst before authoring a change to the spec. Note that spec authoring takes place after an MSC has been accepted, not as part of a proposal itself.

  1. Install the extended version (often the OS default) of Hugo: https://gohugo.io/getting-started/installing. Note that at least Hugo v0.74 is required.

    Alternatively, use the Docker image at https://hub.docker.com/r/klakegg/hugo/.

  2. Run git submodule update --init --recursive for good measure.

  3. Run npm i to install the dependencies. Note that this will require NodeJS to be installed.

  4. Run npm run get-proposals to seed proposal data. This is merely for populating the content of the "Spec Change Proposals" page and is not required.

  5. Run hugo serve (or docker run --rm -it -v $(pwd):/src -p 1313:1313 klakegg/hugo serve) to run a local webserver which builds whenever a file change is detected. If watching doesn't appear to be working for you, try adding --disableFastRender to the commandline.

  6. Edit the specification 🙂

We use a highly customized Docsy theme for our generated site, which uses Bootstrap and Font Awesome. If you're looking at making design-related changes to the spec site, please coordinate with us in #matrix-docs:matrix.org before opening a PR.

Building the specification

If for some reason you're not a CI/CD system and want to render a static version of the spec for yourself, follow the above steps for authoring changes to the specification and instead of hugo serve run hugo -d "spec" - this will generate the spec to /spec. If you'd like to serve the spec off a path instead of a domain root (eg: /unstable), add --baseURL "/unstable" to the hugo -d "spec" command.

For building the swagger definitions, create a python3 virtualenv and activate it. Then run pip install -r ./scripts/requirements.txt and finally python ./scripts/dump-swagger.py to generate it to ./scripts/swagger/api-docs.json. To make use of the generated file, there are a number of options:

Issue tracking

Specification issues are tracked on github at https://github.com/matrix-org/matrix-doc/issues.

See meta/github-labels.rst for information on what the labels mean.