diff --git a/README.md b/README.md index 1f0476f..dee3dbe 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,34 @@ It is still in early development, this README will be updated when I get to depl - The UI is pure HTML/CSS - Except a tiny bit of hand-written JS in the note composer to insert emoji - IndieWeb citizen - - Microformats everywhere - - Webmentions support - - RSS/Atom/JSON feed + - [IndieAuth](https://www.w3.org/TR/indieauth/) support (OAuth2 extension) + - [Microformats](http://microformats.org/wiki/Main_Page) everywhere + - Sends and processes [Webmentions](https://www.w3.org/TR/webmention/) + - RSS/Atom/[JSON](https://www.jsonfeed.org/) feed + - Easy to backup + - Everything is stored in the `data/` directory: config, uploads, secrets and the SQLite database. + +## Getting started + +Check out the [online documentation](https://docs.microblog.pub). + +## Credits + + - Emoji from [Twemoji](https://twemoji.twitter.com/) + - Awesome custom goose emoji from [@pamela@bsd.network](https://bsd.network/@pamela) + + +## Contributing + +All the development takes place on [sourcehut](https://sr.ht/~tsileo/microblog.pub/), GitHub is only used as a mirror: + + - [Project](https://sr.ht/~tsileo/microblog.pub/) + - [Issue tracker](https://todo.sr.ht/~tsileo/microblog.pub) + - [Mailing list](https://sr.ht/~tsileo/microblog.pub/lists) + +Contributions are welcomed, check out the [documentation](https://docs.microblog.pub) for more details. + + +## License + +The project is licensed under the GNU AGPL v3 LICENSE (see the LICENSE file). diff --git a/docs/developer_guide.md b/docs/developer_guide.md new file mode 100644 index 0000000..584707b --- /dev/null +++ b/docs/developer_guide.md @@ -0,0 +1,59 @@ +# Developer's guide + +This guide assume you have some knoweldge of [ActivityPub](https://activitypub.rocks/). + +[TOC] + +## Architecture + +Microblog.pub is a "modern" Python application with "old-school" server-rendered templates. + + - [Poetry](https://python-poetry.org/) is used for dependency management. + - Most of the code is asynchronous, using [asyncio](https://docs.python.org/3/library/asyncio.html). + - SQLite3 is the default database. + +The server has 2 components: + + - The web server (powered by [FastAPI](https://fastapi.tiangolo.com/) and [Jinja2](https://jinja.palletsprojects.com/en/3.1.x/) templates) + - An additional process that takes care of sending "outgoing actities" + +## Tasks + +The project uses [Invoke](https://www.pyinvoke.org/) to manage tasks (a Python powered Makefile). + +You can find the tasks definition in `tasks.py` and list the tasks using: + +```bash +inv -l +``` + +### Media storage + +The uploads are stored in the `data/` directory, using a simple content-addressed storage (file contents hash is the name of the store BLOB). +Files metadata are stored in the database. + +## Installation + +Running a local version requires: + + - Python 3.10+ + - SQLite 3.35+ + +You can follow the [Python developer version of the install instructions](https://docs.microblog.pub/installing.html#python-developer-edition). + +## Documentation + +The documention is managed as Markdown files in `docs/` and the online documentation is built using a homegrown Python script (`scripts/build_docs.py`). + +You can build the documentation locally by running: + +```bash +inv build-docs +``` + +And check out the result by starting a static server using Python standard library: + +```bash +cd docs/dist +python -m http.server 8001 +``` diff --git a/docs/templates/layout.html b/docs/templates/layout.html index 4def13d..2bda71d 100644 --- a/docs/templates/layout.html +++ b/docs/templates/layout.html @@ -63,12 +63,16 @@ nav a:hover, main a:hover, header p a:hover { max-width: 960px; margin: 50px auto; } -code { +pre code { padding: 10px; overflow: auto; display: block; font-family: monospace; } +footer { + margin-top: 50px; + color: #555; +} @@ -83,11 +87,11 @@ code {
{{ version }}