GithubHelp home page GithubHelp logo

baitcenter / actix-blog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dengjianping/actix-blog

0.0 1.0 0.0 1.18 MB

A personal blog powered by rust-lang and actix-web

TSQL 0.46% PLpgSQL 0.28% Rust 16.35% CSS 6.27% JavaScript 65.17% HTML 11.47%

actix-blog's Introduction

Build Status

About this project

There're two branches, the master uses actix-web 1.0, v0.7 uses actix-web 0.7.x.

Thanks to these resources

  • Front-End

  1. Bootstrap 4.x.
  2. Blog templates from Start Bootstrap - Clean Blog.
  3. Admin templates from Start Bootstrap - SB Admin.
  4. Showdown for rendering markdown.
  5. Jquery
  6. Js.cookie(for cookies handling)
  • Back-End

  1. The blazingly fast asynchronous web framework based on Rust: actix-web
  2. Database ORM based on Rust as well: diesel
  3. HTML template engine(rust based): tera

Requirements

  1. Better use stable rust. (2018 edition, though travis compiles the project on nightly and beta one)
  2. Postgresql. (11.x, I didn't try on 9.x or 10.x)

Deployment(rust, postgresql and diesel_cli already installed)

  1. Download the repo
git clone https://github.com/Dengjianping/Actix-Blog.git
  1. Create a database in postgresql, remember the name for next operation.
  2. 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]
  1. Install diesel_cli with the following command.
cargo install diesel_cli --no-default-features --features "postgres"
  1. Create these related tables, make sure 4 tables created and named comments/contacts/posts/users in database.
cd actix_blog
# migration, 
diesel migration run
  1. Configure the project. There's a actix_blog.toml file in root folder, give the actual values to it.
  2. Build the project.
cargo run --release

Glance

main page admin page

Features

  • 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/
    

Future

  • 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.

Issues

  1. Still having problem on rendering markdown, like programming-lang code section.
  2. Cookies handling.
  3. No 404 page.
  4. No tests.
  5. Honestly, the webUI looks really ugly(not good at css/js).
  6. Definitely, there're tons of bugs in this project.

actix-blog's People

Contributors

dengjianping avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.