There're two branches, the master uses actix-web 1.0, v0.7 uses actix-web 0.7.x.
- Bootstrap 4.x.
- Blog templates from Start Bootstrap - Clean Blog.
- Admin templates from Start Bootstrap - SB Admin.
- Showdown for rendering markdown.
- Jquery
- Js.cookie(for cookies handling)
- The blazingly fast asynchronous web framework based on Rust: actix-web
- Database ORM based on Rust as well: diesel
- HTML template engine(rust based): tera
- Better use stable rust. (2018 edition, though travis compiles the project on nightly and beta one)
- Postgresql. (11.x, I didn't try on 9.x or 10.x)
- Download the repo
git clone https://github.com/Dengjianping/Actix-Blog.git
- Create a database in postgresql, remember the name for next operation.
- Create a database environment. Modify the .bashrc(ubuntu), add the following line to it, replace the contents contained by brackets with your own names.
export DATABASE_URL=postgres://[your_name]:[passowrd]@localhost/[database_name]
- Install diesel_cli with the following command.
cargo install diesel_cli --no-default-features --features "postgres"
- Create these related tables, make sure 4 tables created and named comments/contacts/posts/users in database.
cd actix_blog
# migration,
diesel migration run
- Configure the project. There's a actix_blog.toml file in root folder, give the actual values to it.
- Build the project.
cargo run --release
- Sign-in/out
- Password resetting
- Register
- Comment system(ajax)
- Use likes(ajax)
- Search
- Basic admin privileges
- Add/modify post that written by markdown.
- HTTP2(s) Support(not default)
- If you really want to experience http2, use the example ssl keys or follow this English or δΈζ to create certifications, put the generated keys to folder "ssl_keys", rename both keys with the same name as the example's. And Compile the project with this following command.
cargo run --release --features "http2"
- Visit your site with prefix
https://your_address:port_num/
- Tests
- Provide a cli tool for convenient deployment.(in progress)
- Add redis cache system
- Category
- Archive
- OAuth. Allow 3rd-party log-in, like webchat/github/google/apple... .
- The webUI may be rewritten by webassembly(I did some research, several webassembly frameworks is available
- The most important is that I have enough time to do that.
- Still having problem on rendering markdown, like programming-lang code section.
- Cookies handling.
- No 404 page.
- No tests.
- Honestly, the webUI looks really ugly(not good at css/js).
- Definitely, there're tons of bugs in this project.