forked-synapse/docs/website_files
Will Hunt 1198f649ea
Sort versions in the documentation version picker appropriately. (#16966)
Fixes #16964 

This adds a proper sorter for versions which takes into account semantic
versions, rather than just relying on localeCompare.
2024-03-14 15:18:51 +00:00
..
theme Merge remote-tracking branch 'origin/master' into develop 2023-12-12 17:37:17 +00:00
indent-section-headers.css
README.md Version picker added for v1.98 docs 2023-12-11 14:51:26 +00:00
remove-nav-buttons.css
table-of-contents.css Removed page summaries from the top of installation and contributing doc pages (#10711) 2021-08-27 14:19:17 +00:00
table-of-contents.js docs: Don't render the table of contents on the print page (#12340) 2022-04-13 08:27:51 -07:00
version-picker.css Version picker added for v1.98 docs 2023-12-11 14:51:26 +00:00
version-picker.js Sort versions in the documentation version picker appropriately. (#16966) 2024-03-14 15:18:51 +00:00
version.js Merge remote-tracking branch 'origin/master' into develop 2023-12-12 17:37:17 +00:00

Documentation Website Files and Assets

This directory contains extra files for modifying the look and functionality of mdbook, the documentation software that's used to generate Synapse's documentation website.

The configuration options in the output.html section of book.toml point to additional JS/CSS in this directory that are added on each page load. In addition, the theme directory contains files that overwrite their counterparts in each of the default themes included with mdbook.

Currently we use these files to generate a floating Table of Contents panel. The code for which was partially taken from JorelAli/mdBook-pagetoc before being modified such that it scrolls with the content of the page. This is handled by the table-of-contents.js/css files. The table of contents panel only appears on pages that have more than one header, as well as only appearing on desktop-sized monitors.

We remove the navigation arrows which typically appear on the left and right side of the screen on desktop as they interfere with the table of contents. This is handled by the remove-nav-buttons.css file.

Finally, we also stylise the chapter titles in the left sidebar by indenting them slightly so that they are more visually distinguishable from the section headers (the bold titles). This is done through the indent-section-headers.css file.

In addition to these modifications, we have added a version picker to the documentation. Users can switch between documentations for different versions of Synapse. This functionality was implemented through the version-picker.js and version-picker.css files.

More information can be found in mdbook's official documentation for injecting page JS/CSS and customising the default themes.