GithubHelp home page GithubHelp logo

kilerd / rubble Goto Github PK

View Code? Open in Web Editor NEW
52.0 4.0 10.0 4.15 MB

a lightweight blog engine written in Rust.

License: MIT License

Rust 48.04% PLpgSQL 1.55% Dockerfile 1.04% HTML 46.32% TSQL 3.04%
rust actix-web diesel blog-engine

rubble's Introduction

Rubble

a lightweight blog engine written by Rust.

Feature

Cause this project is also the tentative staff I try to write something in Rust, it would not include too many features.

  • Basic Content System without categories
  • Multiple administrators supported
  • Administractor management panel
  • Article management panel
  • Draw supported
  • Customized template
  • RSS supported

Template

Project rubble highly depends on tera, a fast and effective template engine in Rust, which means that you can write your own template with tera syntax.

There are files in template folder as follow, which are the template for each page:

  • admin folder
    • panel.html dashboard of admin panel
    • login.html admin login page
  • homepage.html index of whole site
  • archives.html template of single article page

Obviously you can learn how to write this template by the guide of official template folder, and how to use tera syntax in tera's official website.

How to use it

After deploying rubble to your host, the first thing you need to do is login to the admin panel with url http://yourdomain.com/admin. And the default admin user and password is as follow:

  • Username: admin
  • Password: password

after logging in, please modify the default password of admin. Then you can enjoy the whole project system.

Deploy using Docker

you can easily use Docker to create your own rubble application. And the latest version of it and each tagged version would be built as docker images storing in Docker Hub automatically. So you can easily pull those images by using docker pull kilerd/rubble:latest

Rubble uses PostgresQL as data storage, so before strating rubble application, you need to start your postgres service and link it to rubble.

Rubble image can accept some environment variable for setting up:

  • DATABASE_URL url of postgresQL

Docker Stack

But we recommend to deploy rubble with Docker Swarm or Kubenetes. here is a simple file to create a whole rubble application with postgresQLdocker-compose.yml :

version: "3"
services:
  rubble:
    image: kilerd/rubble:latest
    environment:
      DATABASE_URL: postgres://root:password@postgres/rubble
    depends_on:
      - postgres
    networks:
      - backend

  postgres:
    image: postgres:9-alpine
    restart: always
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: password
      POSTGRES_DB: rubble
    networks:
      - backend

networks:
  backend:

rubble's People

Contributors

dependabot-preview[bot] avatar kilerd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rubble's Issues

docker integration on CI

For Docker Hub spent hours on building the latest version image, it's better to use a custom CI platform like Travis CI or Circle CI. the former one would be faster and practicable.

So the step will be as follow:

  • run and pass all test cases(already exist)
  • build docker image if the trigger branch is in the whitelist.
  • push image to docker hub

Test integration and CI supported

I think I need to consider about some unit test for rubble, but now I have no idea how to do it.
and before integrating test, I need to build a Travis ci to promise that the code I committed is workable

Seems cannot locate the templates folder

Hi Kilerd,
I got an error like this when I was trying it on my Mac,

thread 'actix-rt:worker:0' panicked at 'called Result::unwrap() on an Err value: Error { kind: TemplateNotFound("homepage.html"), source: None }', src/libcore/result.rs:1188:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.
thread 'actix-rt:worker:1' panicked at 'called Result::unwrap() on an Err value: Error { kind: TemplateNotFound("homepage.html"), source: None }', src/libcore/result.rs:1188:5
thread 'actix-rt:worker:2' panicked at 'called Result::unwrap() on an Err value: Error { kind: TemplateNotFound("homepage.html"), source: None }', src/libcore/result.rs:1188:5
thread 'actix-rt:worker:3' panicked at 'called Result::unwrap() on an Err value: Error { kind: TemplateNotFound("homepage.html"), source: None }', src/libcore/result.rs:1188:5

It seems it cannot find the templates folder. Do I need to config env file or something else?
Thank you.

standard restful api supported

for next version, rubble probably removes its admin panel, which would be exacted as a standard component or web. so rubble needs to implement all action though restful API.

restore publish time in editing page

in nowadays version, rubble cannot restore publish time in editing page if there is a specific time for the published article.
if you are re-editing one article, you need to choose the time again manually, which is very inconvenient and unacceptable.

larger base font size

14px(1em) is the basic font size for the current template of rubble, but it is a little small in article's page.
so if possible, modify it as 16px, which is friendly for reading.

specific title for each page

at the index page, it should be the title of the website.
and on the article page, it should be the title of the article.

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.