A blog software. It's meant to be as minimal as possible (thin client), while still maintaining basic readability and styling.
Find a file
2021-05-02 19:43:07 +02:00
content Bumped to 0.3.0. Switched /blog routes to / prefix and moved preevious / route to /about. Changed some env var loading code. 2021-04-03 23:27:58 +02:00
site Updated all dependencies 2021-05-02 19:39:31 +02:00
.gitignore serving social icons from static instead of using the ones from their sites (faster, does not set cookies from <website of icon>) 2020-12-05 22:23:37 +01:00
crablog.env Use example from README.md as default crablog.env 2021-02-13 14:13:17 +01:00
docker-compose.yml Bumped to 0.3.0. Switched /blog routes to / prefix and moved preevious / route to /about. Changed some env var loading code. 2021-04-03 23:27:58 +02:00
Dockerfile Add change to compile with all threads again 2021-02-13 14:04:43 +01:00
README.md Updated readme for the new docker hub image 2021-05-02 19:19:23 +02:00

Crablog

Pure rust. Built with actix, diesel, tera, serde and sqlite3.

Run instructions using docker

  1. Clone the repository
git clone https://github.com/mtrx1337/crablog
cd crablog/site
  1. Install diesel and create a database
cargo install diesel_cli --no-default-features --features "sqlite"
diesel setup --database-url ../content/db.sqlite3
diesel migration run --database-url ../content/db.sqlite3
  1. Set up your configuration file (see below)
  2. Pull the image (or build from source) and run the docker container
docker-compose up -d

Configuration environment file

All configuration options are defined in crablog.env, an example configuration is provided. When not using Docker you may have to add crablog.env to your startup script or define the variables there.

crablog.env

USERNAME=yourusername
EMAIL=me@mydomain.tld
BIND_PORT=8000
SUBMIT_TOKEN=Submit!123 # token needed for submitting
GITHUB_ACCOUNT=usernam3
TWITTER_ACCOUNT=usernam3
MASTODON_ACCOUNT=usernam3@mastodon.social
REDDIT_ACCOUNT=usernam3
DISCORD_ACCOUNT=usernam3

# only needed when not using a docker container
ROOT_PATH=/path/to/template/directory/and/sqliteDB

Routes

Route Description
/ shows the last 5 posts
/id/<id> shows a single post by id
/all shows all posts
/submit set your submit token and create posts
/edit/<id> edit, delete or hide posts
/about information about this blog, social media accounts

API Routes

Route Description
api/blog/posts returns all posts as json