Coder Social home page Coder Social logo

iamalec / octblog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flyhigher139/octblog

0.0 1.0 0.0 1.03 MB

Yet another blog system powered by Flask and MongoDB

Home Page: http://blog.igevin.info

License: GNU General Public License v2.0

Python 46.17% CSS 4.80% HTML 49.03%

octblog's Introduction

About OctBlog

OctBlog is almost the same with MayBlog except that it is powered by Flask and MongoDB rather than Django and SQL Databases.

And as my customary, I named it OctBlog as OctBlog was started in October, 2015

OctBlog offers every function in MayBlog, and aims to do it better, its features are as follow:

  • multiple user
  • roles: su, admin, editor, writer, reader
  • posts, pages, tags, and categories
  • markdown support
  • admin interface
  • change configurations by configuration file or environment variable
  • multiple comment plugin
  • User defined widgets
  • Deploy with docker
  • order posts by weight

Demo

Gevin's Blog is powered by OctBlog

Explanation

The weight is used to order articles, and if you want to hidden an article from the article list, weight is also qualified:

The default weight for each article is 10, if a article's weight is heavier than 10, it will be firstly displayed, and if the weight is negative, the article will be never displayed in the article list

Dependency

Backend

  • Flask
    • flask-script
    • flask-login
    • flask-admin
    • Flask-WTF
    • flask-principal
    • flask_mongoengine
  • WTForms
  • mongoengine
  • markdown2
  • bleach

Frontend

  • jQuery
  • BootStrap
  • Font Awesome
  • highlight.js

How to run OctBlog ?

Run from source code

If you want to see more about the source code, checkout the source code readme

Run by docker(recommended)

Run OctBlog by docker is recommended, here are some instruction:

First Run

1. Get your OctBlog image

In command line, switch to OctBlog root directory, and run the following command to build your own OctBlog image:

cd app
(sudo) docker build gevin/octblog:0.1 .

# Now you can take a cup of coffee and wait for a few minutes :)

Alternatively, pull Octblog image from DockerHub(recommended):

(sudo) docker pull gevin/octblog:0.1

2. Run OctBlog

(sudo) docker-compose up -d

Then you can visit OctBlog in your brower at http://localhost:8000

All environment variables can be found in /OctBlog/config.py

A .env file example:

config=prd
MONGO_HOST=mongo
allow_registration=true
allow_su_creation=true

wechat_subtitle=技术、生活都要折腾
subtitle=技术、生活都要折腾
description=技术、生活都要折腾
wechat_name=GevinView @ <i class="fa fa-weixin" aria-hidden="true"></i>
copyright_msg=注:转载本文,请与Gevin联系
donation_msg=如果您觉得Gevin的文章有价值,就请Gevin喝杯茶吧!
DEBUG=false
google_site_verification=Cj8n-gGgBXzrcuYXoe9fWtDOqNn0hmakKzmoazwrFAY
allow_comment=true
wechat_msg=欢迎关注我的微信公众账号
name=Gevin's Blog

3. Get into OctBlog container

Maybe you would like to dig into the container, the following command will help:

# Specify OctBlog container ID, eg:12345678
(sudo) docker ps

# Get into OctBlog container
(sudo) docker exec -it 12345678 bash

After first run

  • Start OctBlog
(sudo) docker-compose start
  • Stop OctBlog
(sudo) docker-compose stop

Get started with OctBlog

1. Create a superuser to administrate OctBlog

Visit the following url and create a superuser

http://localhost:8000/accounts/registration/su

If the url is forbidden, you need to modify your configurations to allow the creation.

2. Administrate OctBlog

The admin home is: http://localhost:8000/admin

You will be redirected to login page if you haven't logged in

3. Modify the default configurations

You either change settings in app/OctBlog/config.py file, or set environment variables defined in that file.

Setting environment variables is recommended, and once the configuration is changed, you need to restart the service.

License

OctBlog is under GPL2

What's more

If you find a bug or want to add a new feature, just issue me.

Want to contribute? Please fork OctBlog and pull request to me.

I'm not good at frontend development, so I used a free bootstrap blog theme. If you can redesign the blog theme and admin interface, I'll appriciate your work very much!

octblog's People

Contributors

flyhigher139 avatar

Watchers

James Cloos 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.