Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hosted documentation #263

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,36 @@ jobs:
with:
python-version: 3.6
- run: scripts/changelog-check.sh
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.11'

- run: mdbook build

- name: Deploy v${{ steps.package-version.outputs.current-version }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ./book
destination_dir: ./v${{ steps.package-version.outputs.current-version }}

# TODO: We can't update the config so we have to push twice, it's clearly not
# the best solution but it is A solution.
- name: Deploy latest
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
keep_files: true
publish_dir: ./book
destination_dir: ./latest
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ bifrost-registration.yaml
*.log*
data/
.nyc_output/
lib/
lib/
book/
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,18 @@ if certain purple plugins cause more crashes, or if anything in particular lead
## Testing

Running the tests is as simple as doing `yarn test`

### Documentation

Documentation can be found on [GitHub Pages](https://matrix-org.github.io/matrix-appservice-irc).

You can build the documentaion yourself by:
```
# Ensure that Rust is installed on your system.
# cargo install mdbook
mdbook build
sensible-browser book/index.html
```

## Contributing
Please see the [CONTRIBUTING](./CONTRIBUTING.md) file for information on contributing.
27 changes: 27 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[book]
title = "Matrix Bifrost"
authors = ["The Matrix.org Foundation C.I.C."]
language = "en"
multilingual = false
src = "docs"


[build]
# Prevent markdown pages from being automatically generated when they're
# linked to in SUMMARY.md
create-missing = false


[output.html]
# The URL visitors will be directed to when they try to edit a page
edit-url-template = "https://github.com/matrix-org/matrix-bifrost/edit/develop/docs/{path}"

# Remove the numbers that appear before each item in the sidebar, as they can
# get quite messy as we nest deeper
no-section-label = true

# The source code URL of the repository
git-repository-url = "https://github.com/matrix-org/matrix-bifrost"

# The path that the docs are hosted on
site-url = "/matrix-bifrost/"
1 change: 1 addition & 0 deletions changelog.d/263.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add in-tree documentation
11 changes: 11 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Summary

- [Bifrost](./bifrost.md)

# Backends
- [XMPP](./getting-started/xmpp-js.md)
- [node-purple](./getting-started/node-purple.md)

# Help
- [Usage](./usage.md)
- [Troubleshooting](./troubleshooting.md)
2 changes: 2 additions & 0 deletions docs/bifrost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Bifrost
=======
2 changes: 2 additions & 0 deletions docs/getting-started/node-purple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libpurple
=========
2 changes: 2 additions & 0 deletions docs/getting-started/xmpp-js.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
XMPP.js
=======
2 changes: 2 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Troubleshooting
================
2 changes: 2 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Using the bridge
================