Commit graph

33 commits

Author SHA1 Message Date
Kévin Commaille
81273df88e
Adjust margins in rendered endpoints (#2081)
Some checks failed
Spell Check / Spell Check with Typos (push) Has been cancelled
Spec / 🔎 Validate OpenAPI specifications (push) Has been cancelled
Spec / 🔎 Check Event schema examples (push) Has been cancelled
Spec / 🔎 Check OpenAPI definitions examples (push) Has been cancelled
Spec / 🔎 Check JSON Schemas inline examples (push) Has been cancelled
Spec / ⚙️ Calculate baseURL for later jobs (push) Has been cancelled
Spec / 🐍 Build OpenAPI definitions (push) Has been cancelled
Spec / 📢 Run towncrier for changelog (push) Has been cancelled
Spec / 📖 Build the spec (push) Has been cancelled
Spec / 🔎 Validate generated HTML (push) Has been cancelled
Spec / 📖 Build the historical backup spec (push) Has been cancelled
* Use consistent spacing between tables and code blocks

Tables used `4 rem` which is more than the margin above a h2 title, which seems excessive. We change it to `2 rem` which matches the margin of code blocks and info boxes.

We also remove the margin on the last item of a `.rendered-data` block because this is just wasted space.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Adjust spacing around h2 and h3 titles in `.rendered-data`

Given that h2 titles are always preceded by an horizontal rule, we don't need a lot of space to separate them from the previous section.

We also reduce the spacing when a h2 title is followed directly by a h3 title.

Finally, we add a little spacing below both so that tables are less close to the title.

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>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2025-04-15 18:35:27 +01:00
Kévin Commaille
b4c52ab7bd
Use a proper favicon (#2001)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-11-19 22:08:45 +00:00
Kévin Commaille
0657cc1848
Fix error in ToC script at the bottom of the page (#2002)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-11-19 22:06:20 +00:00
Kévin Commaille
0ce83512fc
Update Inter font and set display: swap (#2000)
The version of Inter is updated to use a variable font, which is supported widely among modern browsers.

Using `display: swap` means that the browser will render the text of the spec even before Inter is loaded, making the website appear to load faster on mobile.

Allow the browser to use the local Inter font if it exists.
2024-11-19 22:01:27 +00:00
Kévin Commaille
9882d95775
Improve the quality of the rendered diagrams (#1999)
The first commit allows to lazy-load the diagrams, which should improve the loading time of the CS API on mobile. In the process it also improves the alt text of the images.

The second commit serves the diagrams as high-resolution WebPs. Encoding a high resolution diagram as WebP gives a file of approximately the same size as the lower resolution PNG. For maximum compatibility we also serve them as a lower resolution WebP and a fallback PNG. WebP was chosen because it is one of the export formats of draw.io/diagrams.net, and it is widely available in modern browsers.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-11-19 21:41:45 +00:00
Kévin Commaille
d5c56a4f17
Upgrade docsy to 0.11.0 and hugo to 0.139.0 (#1996)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-11-19 21:40:34 +00:00
Kévin Commaille
bf8dee74eb
Fix relative URLs when serving the specification with a custom baseURL (#1984) 2024-11-14 11:11:34 +00:00
Kévin Commaille
3b8f3a09aa
Remove CSS workaround for scroll-anchoring (#1976)
Docsy does not set the `height` anymore, but the `min-height`, which doesn't seem to affect scroll-anchoring.
See f22a70ec56

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-29 22:58:53 +00:00
Kévin Commaille
1f5f2c4d83
Enforce consistent vertical spacing between paragraphs in endpoint definitions (#1969)
Use `p` elements to separate paragraphs instead of `br` and enforce single paragraphs to be wrapped in `p` for consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-10-29 15:22:15 +00:00
Kévin Commaille
1e47d7ec48
Remove boxes/added-in-paragraph shortcode (#1970) 2024-10-14 17:57:33 +01:00
Johannes Marbach
215982abc2
Use dedicated fonts for better support of mathematical symbols (#1919) 2024-08-19 13:11:05 +01:00
Johannes Marbach
ee1a169121
Arrange rows in .basic-info tables vertically when horizontal space is constrained (#1771)
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-04-09 13:31:46 +00:00
Johannes Marbach
8ff3623e37
Reduce whitespace on mobile viewports (#1770)
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2024-03-27 09:55:01 +00:00
Kévin Commaille
6700f5ddd1
Disable smooth scrolling (#1762)
It was not enabled before the docsy update and it messes with
the TOC highlighting during the transition.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-21 11:03:07 +00:00
Kévin Commaille
b136b357e0
Update docsy to v0.8.0 (#1699)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-02-27 18:12:39 +00:00
Martin Fischer
1a11a7b998
Use auto table-layout on desktop (#1601)
Signed-off-by: Martin Fischer <martin@push-f.com>
2023-07-20 07:23:16 +00:00
Kévin Commaille
a6eb381ebb
Fix the sidebar in recent versions of Hugo (#1551)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-27 22:24:22 +01:00
Kévin Commaille
564444d43e
Render binary request and response bodies (#1579)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-20 18:33:06 +01:00
David Robertson
f9ea0f9d9b
Only include endpoint path in <summary> (#1446) 2023-03-02 16:58:04 +00:00
Richard van der Hoff
a9e9202e89
Load Inter CSS directly (#1444)
Move the load of the Inter font CSS from _variables_project.scss to head-end.html.

Empirically, this seems to fix #965
2023-02-28 14:56:19 +00:00
David Robertson
07442876ce
Improve presentation of push rules kinds and actions (#1348) 2022-11-22 16:01:23 +00:00
Andrew Morgan
fd41d9d4ed
Update docsy (hugo theme) git submodule (#1295) 2022-11-08 17:29:10 +00:00
Travis Ralston
afc0e6a026
Add CORP headers to media repo (#1197)
* Add CORP headers to media repo

MSC: https://github.com/matrix-org/matrix-spec-proposals/pull/3828

* Write weird CSS rules to make added-in work inline in the CS spec

Even though our content doesn't need 2 paragraphs, it's good to have the capability to render it in the future.

* Remove test paragraph

* Refine prose

* spelling is key
2022-08-09 10:44:51 -06:00
Richard van der Hoff
ef384f1afd
Give rendered-data sections a background and some padding (#1195)
Gives definition sections for APIs, events, etc a background and a small indent, which I find very helpful to guide the eye.
2022-08-04 09:46:11 +00:00
Richard van der Hoff
dc4fd9bdd6
Render HTML anchors for definition blocks (#1191)
It's handy to be able to link to these.
2022-08-03 07:28:47 +01:00
Richard van der Hoff
b58c7a5839
Reinstate margin between tables (#1192) 2022-08-02 23:47:57 +01:00
David Robertson
69ff51c017
Tweak style of <code> samples in rendered tables (#1179)
* Tweak style of `<code>` samples in rendered tables

This has been subtly irritating me for aaaaaaages

* Changelogs
2022-08-02 14:49:27 +01:00
Richard van der Hoff
91aebd62c4
CSS hack to fix scroll anchoring (#1183)
Disable explicit `height` setting for the top-level div, which breaks scroll
anchoring
2022-08-01 11:08:15 +01:00
Richard van der Hoff
ea42cd3c7b
Move various e2e defintions out to yaml files (#1166)
We have code to generate tables, which we should use in the e2e section.
2022-07-19 22:02:48 +01:00
Richard van der Hoff
03cdea4b57
Style tweak for API rendering (#1012)
Tighter bound on the `max-width` property for paragraphs inside rendered
APIs. AFAICT it's only meant to apply to the summary.
2022-03-31 10:33:53 +01:00
Richard van der Hoff
d38663f65d
Fix syntax highlighting in rendered spec (#1008)
* Configure syntax highlighter to use CSS classes

the inline `style` attributes cause CSP errors (and don't work). Instead, we
can use proper CSS classes.

* Configure response headers for Hugo dev server

make the dev server serve response headers which match the live site, for
better testing.
2022-03-29 16:02:48 +01:00
Richard van der Hoff
d199c05e97
Suppress scroll-anchoring in the sidebar (#992) 2022-03-08 17:54:00 +00:00
Andrew Morgan
a8f7723fe5 Rename assets-hugo directory to assets (#3259)
Now that we've dropped the old build pipeline (and an assets directory does not exist in the repo any longer, we can rename the hugo version of the assets (assets-hugo) created during the build tools migration back to simply assets.
2022-01-06 10:37:13 +00:00