You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 2 години
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Synapse Documentation
  2. **The documentation is currently hosted [here](https://matrix-org.github.io/synapse).**
  3. Please update any links to point to the new website instead.
  4. ## About
  5. This directory currently holds a series of markdown files documenting how to install, use
  6. and develop Synapse. The documentation is readable directly from this repository, but it is
  7. recommended to instead browse through the [website](https://matrix-org.github.io/synapse) for
  8. easier discoverability.
  9. ## Adding to the documentation
  10. Most of the documentation currently exists as top-level files, as when organising them into
  11. a structured website, these files were kept in place so that existing links would not break.
  12. The rest of the documentation is stored in folders, such as `setup`, `usage`, and `development`
  13. etc. **All new documentation files should be placed in structured folders.** For example:
  14. To create a new user-facing documentation page about a new Single Sign-On protocol named
  15. "MyCoolProtocol", one should create a new file with a relevant name, such as "my_cool_protocol.md".
  16. This file might fit into the documentation structure at:
  17. - Usage
  18. - Configuration
  19. - User Authentication
  20. - Single Sign-On
  21. - **My Cool Protocol**
  22. Given that, one would place the new file under
  23. `usage/configuration/user_authentication/single_sign_on/my_cool_protocol.md`.
  24. Note that the structure of the documentation (and thus the left sidebar on the website) is determined
  25. by the list in [SUMMARY.md](SUMMARY.md). The final thing to do when adding a new page is to add a new
  26. line linking to the new documentation file:
  27. ```markdown
  28. - [My Cool Protocol](usage/configuration/user_authentication/single_sign_on/my_cool_protocol.md)
  29. ```
  30. ## Building the documentation
  31. The documentation is built with [mdbook](https://rust-lang.github.io/mdBook/), and the outline of the
  32. documentation is determined by the structure of [SUMMARY.md](SUMMARY.md).
  33. First, [get mdbook](https://github.com/rust-lang/mdBook#installation). Then, **from the root of the repository**,
  34. build the documentation with:
  35. ```sh
  36. mdbook build
  37. ```
  38. The rendered contents will be outputted to a new `book/` directory at the root of the repository. Please note that
  39. index.html is not built by default, it is created by copying over the file `welcome_and_overview.html` to `index.html`
  40. during deployment. Thus, when running `mdbook serve` locally the book will initially show a 404 in place of the index
  41. due to the above. Do not be alarmed!
  42. You can also have mdbook host the docs on a local webserver with hot-reload functionality via:
  43. ```sh
  44. mdbook serve
  45. ```
  46. The URL at which the docs can be viewed at will be logged.
  47. ## Configuration and theming
  48. The look and behaviour of the website is configured by the [book.toml](../book.toml) file
  49. at the root of the repository. See
  50. [mdbook's documentation on configuration](https://rust-lang.github.io/mdBook/format/config.html)
  51. for available options.
  52. The site can be themed and additionally extended with extra UI and features. See
  53. [website_files/README.md](website_files/README.md) for details.