Skip to content

Commit 8b29bc3

Browse files
Add documentation
1 parent 9b2a2ee commit 8b29bc3

File tree

11 files changed

+95
-0
lines changed

11 files changed

+95
-0
lines changed

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.log
2+
site/
3+
VENV/

docs/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all: html
2+
3+
html:
4+
mkdocs build -v

docs/docs/about.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# About SaltyRTC
2+
3+
For more information about the project, please visit
4+
[saltyrtc.org](http://saltyrtc.org).

docs/docs/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Workaround for duplicate headings: https://github.com/mkdocs/mkdocs/issues/318 */
2+
li.toctree-l3:first-child {
3+
display: none;
4+
}

docs/docs/img/favicon.ico

5.02 KB
Binary file not shown.

docs/docs/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SaltyRTC Server
2+
3+
This is a SaltyRTC server implementation written in Python 3 with asyncio.
4+
5+
**Contents**
6+
7+
* [Installing](installing.md)
8+
* [Usage](usage.md)
9+
* [About](about.md)

docs/docs/installing.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Installing
2+
3+
**Note:** On machines where Python 3 is not the default Python runtime, you
4+
should use `pip3` instead of `pip`.
5+
6+
## Prerequisites
7+
8+
You need the following packages installed to be able to run the SaltyRTC
9+
server:
10+
11+
- python3
12+
- python3-pip
13+
- libsodium-dev
14+
15+
## Option A: Installing System-Wide
16+
17+
Now install `saltyrtc.server` from [PyPI](https://pypi.python.org/):
18+
19+
$ sudo pip install saltyrtc.server
20+
21+
## Option B: Installing in a Venv
22+
23+
If you don't want to install saltyrtc-server-python system-wide, we
24+
recommend using [venv](https://docs.python.org/3/library/venv.html) to create
25+
an isolated Python environment.
26+
27+
$ python3 -m venv venv
28+
29+
You can switch into the created virtual environment venv by running this command:
30+
31+
$ source venv/bin/activate
32+
33+
While the virtual environment is active, all packages installed using `pip`
34+
will be installed into this environment.
35+
36+
$ pip install saltyrtc.server

docs/docs/usage.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Usage
2+
3+
The script `saltyrtc-server` will be automatically installed and provides a
4+
command line interface for the server. Run the following command to see usage
5+
information:
6+
7+
$ saltyrtc-server --help

docs/mkdocs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
site_name: SaltyRTC Server
2+
site_description: Documentation for saltyrtc-server-python.
3+
site_author: Lennart Grahl
4+
copyright: © 2016-2017 Lennart Grahl
5+
theme: readthedocs
6+
repo_url: https://github.com/saltyrtc/saltyrtc-server-python
7+
edit_uri: edit/master/docs/docs/
8+
markdown_extensions:
9+
- smarty
10+
- toc:
11+
permalink: False
12+
pages:
13+
- Home: index.md
14+
- Guide:
15+
- Installing: installing.md
16+
- Usage: usage.md
17+
- About: about.md
18+
theme_dir: theme_overrides
19+
extra_css:
20+
- custom.css

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocs==0.16.3
2+
Pygments==2.1.3

docs/theme_overrides/main.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% extends "base.html" %}
2+
3+
{% block site_name %}
4+
<img src="https://saltyrtc.org/static/img/shaker.svg" alt="Logo">
5+
<a href="{{ nav.homepage.url }}" class="icon icon-home"> {{ config.site_name }}</a>
6+
{% endblock %}

0 commit comments

Comments
 (0)