Blask is a blogging engine based on Flask. Blask uses Markdown syntax to create and render the contents of blog posts.
Blask uses the Jinja2 template engine to render the web templates.
To install Blask, use pip:
pip install blaskor download the source code:
git clone https://github.com/zerasul/blask.gitAfter downloading you need to create a settings.py file:
templateDir = "templates"
postDir = "posts"
defaultLayout = "template.html"
staticDir = "static"
title = "Blask | A Simple Blog Engine Based on Flask"
errors= { 404: "404"}You can also use an environment variable to set the settings:
export BLASK_SETTINGS=settingsTo Run Blask, use the following Code:
from blask import BlaskApp import settings
if __name__ == '__main__':
b = BlaskApp(templateDir=settings.templateDir, postDir=settings.postDir, defaultLayout=settings.defaultLayout,
staticDir=settings.staticDir, title=settings.title, errors={404:'404'})
b.run()You can use the Blask Command Line Tool to run the site:
blaskcli run --port 4444 #sets the port to 4444For more information, see the Blask web page. Also, you can subscribe to our Mailing List.
To use Docker to provide a development environment, make sure you have Docker installed, along with docker-compose of at least version 1.27.
Run this command to start your development environment:
docker-compose up -dTo shut down your development environment, run this command:
docker-compose downYou can access your Blask development site by visiting http://localhost:8000 in your browser.
You can see the Code of Participation of this project.
Blask is Open Source under the GPL 3.0 License