Skip to content

Commit

Permalink
Add new mdbook docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ihabunek committed Mar 3, 2023
1 parent 33fb3c7 commit 32d65a1
Show file tree
Hide file tree
Showing 20 changed files with 1,591 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
/.pytest_cache/
/build/
/dist/
/docs/_build/
/htmlcov/
/tmp/
/toot-*.tar.gz
debug.log
/pyrightconfig.json
/book
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ clean :

changelog:
./scripts/generate_changelog > CHANGELOG.md
cp CHANGELOG.md docs/changelog.md

docs: changelog
mdbook build

docs-serve:
mdbook serve

docs-deploy: docs
rsync --archive --compress --delete --stats book/ bezdomni:web/toot
13 changes: 13 additions & 0 deletions book.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Overrides for the docs theme */
table { width: 100% }
table th { text-align: left }
code { white-space: pre }
h2, h3 { margin-top: 2.5rem; }
h4, h5 { margin-top: 2rem; }

td.code {
font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
font-size: 0.875em;
width: 20%;
white-space: nowrap;
}
13 changes: 13 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[book]
authors = ["Ivan Habunek"]
language = "en"
multilingual = false
src = "docs"
title = "toot"

[output.html]
additional-css = ["book.css"]

[preprocessor.toc]
command = "mdbook-toc"
renderer = ["html"]
13 changes: 13 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Summary

[Introduction](introduction.md)

- [Installation](installation.md)
- [Usage](usage.md)
- [Advanced](advanced.md)
- [TUI](tui.md)
- [Contributing](contributing.md)
- [Changelog](changelog.md)
- [Release procedure](release.md)

[License](license.md)
39 changes: 39 additions & 0 deletions docs/advanced.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Advanced usage
==============

Disabling HTTPS
---------------

You may pass the `--disable-https` flag to use unencrypted HTTP instead of
HTTPS for a given instance. This is inherently insecure and should be used only
when connecting to local development instances.

```sh
toot login --disable-https --instance localhost:8080
```

Using proxies
-------------

You can configure proxies by setting the `HTTPS_PROXY` or `HTTP_PROXY`
environment variables. This will cause all http(s) requests to be proxied
through the specified server.

For example:

.. code-block:: sh

export HTTPS_PROXY="http://1.2.3.4:5678"
toot login --instance mastodon.social

**NB:** This feature is provided by
[requests](http://docs.python-requests.org/en/master/user/advanced/#proxies>)
and setting the environment variable will affect other programs using this
library.

This environment can be set for a single call to toot by prefixing the command
with the environment variable:

```
HTTPS_PROXY="http://1.2.3.4:5678" toot login --instance mastodon.social
```
Loading

0 comments on commit 32d65a1

Please sign in to comment.