Add more docs

This commit is contained in:
Jan-Lukas Else 2021-12-24 14:50:36 +01:00
parent 2ac14e6f8e
commit ec07af9469
2 changed files with 29 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# GoBlog's storage system
GoBlog stores all data that must be persistent in the subdirectory `data` of the current working directory. This directory contains the SQLite database file and the directory media that contains all uploaded files.
## Database
GoBlog uses a SQLite database for storing most of the data (posts, comments, webmention, sessions, etc.). The database is accessed using the Go library [mattn/go-sqlite3](https://github.com/mattn/go-sqlite3). With each startup it is checked if there are schema migrations to be performed on the database.
@ -22,4 +24,8 @@ queue
sessions
shortpath
webmentions
```
```
## Media files
To prevent data duplication, GoBlog stores files with the filename of the SHA-256 hash of the file.

View File

@ -8,6 +8,28 @@ This section of the documentation is a work in progress!
To schedule a post, create a post with `status: scheduled` and set the `published` field to the desired date. A scheduler runs in the background and checks every 10 seconds if a scheduled post should be published. If there's a post to publish, the post status is changed to `published`. That will also trigger configured hooks. Scheduled posts are only visible when logged in.
## Media storage
By default, GoBlog stores all uploaded files in the `media` subdirectory of the current working directory. It is possible to change this by configuring the `micropub.mediaStorage` setting. Currently it is possible to use BunnyCDN or any FTP storage as an alternative to the local filesystem.
### Media compression
To reduce the data transfer for blog visitors, GoBlog can compress the media files after they have been uploaded. If configured, media files with supported file extensions get compressed and the compressed file gets stored as well.
GoBlog currently supports the following media compression providers:
- [Cloudflare](https://cloudflare.com/) (no API key required)
- [ShortPixel](https://shortpixel.com/) (API key required)
- [Tinify](https://tinify.com/) (API key required)
Take a look at the `example-config.yml` on how to configure the compression providers.
It is possible to configure multiple compression providers. If one fails, the next one is tried. The current priority is as follows:
1. ShortPixel
2. Tinify
3. Cloudflare
## Text-to-Speech
GoBlog features a button on each post that allows you to read the post's content aloud. By default, that uses an API from the browser to generate the speech. But it's not available on all browsers and on some operating systems it sounds horrible.