Skip to content

About

Personal blog website with Markdown using an Axum (Rust) backend

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Latest commit

 

History

92 Commits

Folders and files

Repository files navigation

Personal blog website with Markdown using a plain HTML/CSS/JavaScript frontend and Axum (Rust) backend

Setup

Clone this repository including submodules to make syntax highlighting work.

git clone --recurse-submodules --shallow-submodules https://github.com/JorianWoltjer/jorianwoltjer.com

A .env file should be created with two strong randomly generated passwords for the database.

The following command will build and start the containers:

docker-compose up -d --build

# View logs temporarely
docker-compose logs --tail=10 --follow

While it is running, use the manager binary to perform some administrative actions.

$ docker compose exec -it app manager
Perform simple management tasks on the website

Usage: manager <COMMAND>

Commands:
  theme     Syntax highlighing themes
  render    Update generated HTML for all posts
  password  Set administrator password (will be prompted)
  seed      Insert a basic folder/post hierarchy for local testing
  export    Export blog folders, posts, and images as Markdown files
  help      Print this message or the help of the given subcommand(s)

The most important to start with is password to set a new strong password for the /login page (default is "secret").
Any changes to the render code should be followed by running the render management command to refresh all HTML in the database.

Development

Run database server for testing

docker run --name postgres-dev -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres

Run and create tables on local database

sqlx database drop && sqlx database create && sqlx migrate run

Create database dump:

docker exec -it jw-db pg_dump -U postgres > app.dump

Restore database dump:

docker exec -i jw-db psql -U postgres < app.dump

About

Personal blog website with Markdown using an Axum (Rust) backend

Topics

Resources

Stars

13 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages