A simple static blog template.
Python versions: 2.7 or 3.5+.
- Clone this repository:
git clone https://github.com/Marketionist/py-blog.git
- Create virtual environment and activate it:
python -m venv py-blog/
source py-blog/bin/activate
- Switch to py-blog folder and install all dependencies:
cd py-blog && pip install -r requirements.txt
FLASK_APP='server.py' FLASK_ENV='development' flask run
The server will start running on http://127.0.0.1:5000/ (Press CTRL+C to quit).
- Add the articles as markdown
.md
files to theposts/{post-category}
folder. Here is a good Markdown Cheatsheet. Corresponding URL will be generated from each article file name. - Add images for each article to
static/images/{post-category}
folder. - Generate the static files:
SERVER_NAME='yourdomain.org' python freeze.py
All generated files will appear inside the build
folder. Copy generated files
to your hosting.
If this script was helpful to you, please give it a ★ Star on GitHub.