Coder Social home page Coder Social logo

taoblog's Introduction

Taoblog

Taoblog is just another lightweight blog system.

Dependencies

  1. Flask
  2. SQLAlchemy
  3. hoedown (super fast markdown parser)
  4. rauth (OAuth support)
  5. pygments (highlight your code)

How to use

Install dependencies:

pip install -r requirements.txt

Run demo locally:

python run.py

Visit localhost:5000 to see what happened.

Most of time, you probably need to do some configuration to meet your requirements. A configuration file can be specified by the environment variable TAOBLOG_CONFIG_PATH, for example:

TAOBLOG_CONFIG_PATH="/absolute/path/to/config_file" python run.py

If you would like to deploy it in the production environment, import application module from the provided taoblog package, and pass it to any WSGI server. See http://flask.pocoo.org/docs/deploying/ for more details.

Configuration


SECRET_KEY

Keep it complex and secret.

For example:

SECRET_KEY = u'永远是个密秘'.encode('utf-8')

SERVER_NAME

Your server name, a string of pattern address:port. It must be set to your actual server name in the production environment.

For example:

server_name = 'example.com' # default port 80

DEBUG

If True, it will render debug information when you get exceptions.


DATABASE_ECHO

If True, it will log all statements to your console.


DATABASE_URI

See: http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#database-urls

For example:

DATABASE_URI = 'sqlite:////path/to/your/taoblog.db'

ADMIN_EMAIL

It can be a single email string or a list of email string, or a single *, which means all registered users can be admin.

For example:

ADMIN_EMAIL = '[email protected]'
ADMIN_EMAIL = '*'        ## WARN: it means EVERY registered users can manage your blog
ADMIN_EMAIL = ['[email protected]', '[email protected]']

GOOGLE_ANALYTICS_ID

Your Google analytics ID. If provided, the Google Analytics code will be embedded in your pages.

For example:

GOOGLE_ANALYTICS_ID = 'UA-35730532-1'

POST_PERPAGE

How many posts you want to show per page.


FACEBOOK_CONSUMER and GOOGLE_CONSUMER

A tuple stores your consumer info.

For example:

## facebook consumer pairs
FACEBOOK_CONSUMER = ('XXXXX', 'XXXXXX')

Licence

Taoblog is under the MIT License. See LICENSE file for full license text.

taoblog's People

Contributors

ptpt avatar

Watchers

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