Skip to content
A clean, elegant blog built on Rust
JavaScript CSS Rust Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.docker 1. remove dump.sql May 31, 2019
.vscode gitignore remove .vscode Jan 22, 2019
images update Jan 20, 2020
migrations update migrations up.sql May 29, 2019
src add solgan adn sub slogan Dec 24, 2019
static use cdn to service `simplemde` library. Jan 29, 2020
.env update log path again Dec 24, 2019
.gitignore update .gitignore May 21, 2019
Rocket.toml change log file location Oct 11, 2019
diesel.toml upgrade diesel Aug 5, 2018
docker-compose.yml docker blog(not finished) May 30, 2019

Attention: Because Rocket is sensitive with compiler and it highly depends on lately nightly compiler, so it’s so easy to fail when compiling this project.


This is my personal blog, and its also my first Rust project.

Why Rust

Well, I know there are a lot of alternatives to writing a blog, but I find other languages such as Java, Python, Javascript,Php, are not fancy enough ;-) Kidding, the truth is that I have learned Rust for more that a half years, but I still could not build real some stuff on Rust. Yes, I lack of idea or I not am skillful enough to fulfill my thought. Finally, I decided to rewrite my blog which was built on Github Page and Org-mode.

Getting Started



Install Rust via shell script

curl -sSf | sh

After installing, you might need to

source $HOME/.cargo/env

Because this project is built on Rocket, and Rocket depends on Rust nightly, so you need change Rust environment to nightly

rustup default nightly

Diesel Cli

This project use Diesel as Orm framework, so you need to install its command line tool via Rust package manager(eg, Cargo)

cargo install diesel_cli --no-default-features --features postgres


you need to install Postgresql database, and then configure postgresql by following document’s guide

Init database

After everything is done, it is time to create table in database for this project, just run

diesel migration run

Set up envirnment variables

In the last step, you need to create a file named .env in the root of your repository, set up the following envirnment variables, for examples:

SLOGAN="Ramsay's Utopia"
SUB_SLOGAN="fn<T:time+joy>(resource: T)-> Ramsay's Blog"

Launch Rocket

Everything is ok, now, launch Rocket:

cargo run

And open your favourite browser, enter localhost:8000

If you want to login admin page, you could enter localhost:8000/admin/login Email: Password: 123456

Todo List

  • refactor admin page, it is unacceptedly ugly.


About Page


Index Page


You can’t perform that action at this time.