25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435
  1. # Documentation Website Files and Assets
  2. This directory contains extra files for modifying the look and functionality of
  3. [mdbook](https://github.com/rust-lang/mdBook), the documentation software that's
  4. used to generate Synapse's documentation website.
  5. The configuration options in the `output.html` section of [book.toml](../../book.toml)
  6. point to additional JS/CSS in this directory that are added on each page load. In
  7. addition, the `theme` directory contains files that overwrite their counterparts in
  8. each of the default themes included with mdbook.
  9. Currently we use these files to generate a floating Table of Contents panel. The code for
  10. which was partially taken from
  11. [JorelAli/mdBook-pagetoc](https://github.com/JorelAli/mdBook-pagetoc/)
  12. before being modified such that it scrolls with the content of the page. This is handled
  13. by the `table-of-contents.js/css` files. The table of contents panel only appears on pages
  14. that have more than one header, as well as only appearing on desktop-sized monitors.
  15. We remove the navigation arrows which typically appear on the left and right side of the
  16. screen on desktop as they interfere with the table of contents. This is handled by
  17. the `remove-nav-buttons.css` file.
  18. Finally, we also stylise the chapter titles in the left sidebar by indenting them
  19. slightly so that they are more visually distinguishable from the section headers
  20. (the bold titles). This is done through the `indent-section-headers.css` file.
  21. In addition to these modifications, we have added a version picker to the documentation.
  22. Users can switch between documentations for different versions of Synapse.
  23. This functionality was implemented through the `version-picker.js` and
  24. `version-picker.css` files.
  25. More information can be found in mdbook's official documentation for
  26. [injecting page JS/CSS](https://rust-lang.github.io/mdBook/format/config.html)
  27. and
  28. [customising the default themes](https://rust-lang.github.io/mdBook/format/theme/index.html).