We used to only look for examples in a few (sometimes arbitrary) places, and we didn't support showing several examples in most cases. This is intended to fix this. In the process we try to deduplicate code to make sure that we use the same logic everywhere.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
First of all, all PDU definitions were based on the v1 PDU definition with a few fields overwritten to change the format with needed.
While that works when rendering the spec, this is semantically incorrect because it means that the objects must match both schemas, which is impossible.
So now we make a base with only the common fields, and we add the others as needed by the room version.
Note that there is no more "unsigned PDU" definition since it is not used directly, and hashes and signatures are the same across all versions.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Explain that it was a release prior to the current global versioning system.
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Signed-off-by: Tulir Asokan <tulir@maunium.net>
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Remove the `origin` field on PUT /send_join responses
This is a spec bug as it has actually never been sent by Synapse, going back to 2014.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Remove release_date from Hugo config
It seems unnecessary because it is not used anywhere.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Remove erroneous sentence from Hugo config docs
The version is updated manually during the release (see /meta/releasing.md), not by CI.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Specify account suspension
* changelog
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add some links
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Add error codes from MSC4178
* changelog
* Put changelog in the right place
* Move newsfile
* Add the codes to the right endpoint
* Also add M_THREEPID_IN_USE
which was always used and is specified in the IS API, but not in the
C/S API. We decided this was well-specced enough that it didn't need
its own MSC.
The `alert` role is intrusive and should only be used when the user's immediate attention is required.
Given that this boxes only provide additional content to the current paragraph,
the `note` role seems more appropriate.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
The `type` attribute is not needed when the content is JavaScript,
and the `language` attribute is deprecated.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Hugo generates stats about the HTML elements, IDs and classes that can be found in the website,
and we post-process the rendered CSS with postcss-purgecss that uses those stats to remove unused selectors.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
It was a change I did not notice when upgrading Docsy from 0.8.0 to 0.11.0. Docsy changed the way heading self links are generated: they used to be rendered with JS and now they use a Hugo render hook.
This means two things:
- We need to enable them explicitly by overriding the `_default/_markup/render-heading.html` template.
- We need to add the self heading ourselves to headings that are not rendered by Hugo, i.e. HTML headings that we create ourselves.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Use json instead of json5 for syntax highlighting
Chroma, the library used for syntax highlighting in Hugo, does not support JSON5 so those code blocks were not highlighted.
However it supports comments in JSON so they are highlighted correctly in the rendered spec.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
* Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
---------
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
When used with a text that includes multiple paragraphs, the partial created invalid HTML by nesting `<p>` elements.
It also changed the rendering by making "Changed in vX.XX:" a separate paragraph, when it is inline with a single paragraph.
To change that we do as with "Required" and add "Changed in vX.XX:" to the text before it is rendered, making it inline with the first paragraph.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
If the description is not set in the object definition, Hugo generates a weird string after "Required": `%!s(<nil>)`.
To avoid that, we default the description to an empty string when it is not set.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
According to the W3C's HTML validator, trailing slashes in void-element have no effect,
and might interact badly in some cases.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>