summary refs log tree commit diff
path: root/docs/website_files/README.md
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-06-03 17:20:40 +0100
committerGitHub <noreply@github.com>2021-06-03 17:20:40 +0100
commitfd9856e4a98fb3fa9c139317b0a3b79f22aff1c7 (patch)
treec9aeec6486e6f169dd8db5fbd692a0fff36bacdb /docs/website_files/README.md
parentAdd OpenTracing for database activity. (#10113) (diff)
downloadsynapse-fd9856e4a98fb3fa9c139317b0a3b79f22aff1c7.tar.xz
Compile and render Synapse's docs into a browsable, mobile-friendly and searchable website (#10086)
Diffstat (limited to 'docs/website_files/README.md')
-rw-r--r--docs/website_files/README.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/website_files/README.md b/docs/website_files/README.md
new file mode 100644
index 0000000000..04d191479b
--- /dev/null
+++ b/docs/website_files/README.md
@@ -0,0 +1,30 @@
+# Documentation Website Files and Assets
+
+This directory contains extra files for modifying the look and functionality of 
+[mdbook](https://github.com/rust-lang/mdBook), the documentation software that's
+used to generate Synapse's documentation website.
+
+The configuration options in the `output.html` section of [book.toml](../../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](https://github.com/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.
+
+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
+[customising the default themes](https://rust-lang.github.io/mdBook/format/theme/index.html).
\ No newline at end of file