diff --git a/book.toml b/book.toml index ed3f6151e0..977a8450bc 100644 --- a/book.toml +++ b/book.toml @@ -34,8 +34,13 @@ additional-css = [ "docs/website_files/table-of-contents.css", "docs/website_files/remove-nav-buttons.css", "docs/website_files/indent-section-headers.css", + "docs/website_files/version-picker.css", +] +additional-js = [ + "docs/website_files/table-of-contents.js", + "docs/website_files/version-picker.js", + "docs/website_files/version.js", ] -additional-js = ["docs/website_files/table-of-contents.js"] theme = "docs/website_files/theme" [preprocessor.schema_versions] diff --git a/docs/website_files/README.md b/docs/website_files/README.md index 04d191479b..bc51c4865e 100644 --- a/docs/website_files/README.md +++ b/docs/website_files/README.md @@ -24,6 +24,11 @@ Finally, we also stylise the chapter titles in the left sidebar by indenting the 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](https://rust-lang.github.io/mdBook/format/config.html) and diff --git a/docs/website_files/theme/index.hbs b/docs/website_files/theme/index.hbs index 3b7a5b6163..b169323a43 100644 --- a/docs/website_files/theme/index.hbs +++ b/docs/website_files/theme/index.hbs @@ -131,6 +131,18 @@ {{/if}} +