Feel free about writing blog. This is a simple blog system, Just bloging, Implemented on bottle.
This is a simple blog system based on Bottle, Jinja2, SQLalchemy.
White blog with Markdown.
Demo
- Not avaliable
Quick Start
details see Deploy
git clone https://github.com/yueyoum/paper.git
cd paper
cp settings.py.example settings.py
vim settings.py
echo "this is me" > templates/me.html
make init
make database
make key
make run
Then you can visit the demo at http://127.0.0.1:8999 (static file will not be served)
For static files, you need nignx, or set DEBUG = True in settings.py
Deploy
- using git or download paper directly.
- settings
cp settings.py.example settings.py
your should modify the settings with your needs - set up a html page for /about linkcreate a me.html file in templates folder. this page will show in /about link
- paper use virtualenv to running in a independent python environments. run this commands below:
make init
- paper use sqlalchemy as ORM, so sync table metadata to DB
make database
- generate the key for post blog.you will using paper-client to post blog. so, this key is used for security.
make key
- start the webgunicorn with gevent_pywsgi workers will serve the web at 127.0.0.1:8999
make run
- config nginxthere is a nginx config file located at deploy folder, copy and modify it to make nginx serve paper
How to post blog
paper is designed for writing markdown at local, you need paper-client to post markdown.
At the step 5 above, we make the security key via make key. the key file is located at src/ folder.
cat src/_key, and you will get the security key, copy it. It will be used for paper_client.conf.
details see paper-client
from https://github.com/yueyoum/paper
------
Paper-Client
this is the client of paper, used for post markdown.
How to use
git clone https://github.com/yueyoum/paper-client.git
cd /usr/local/bin
sudo ln -s YOUR_PATH/paper-client/paper_publish.sh paper_publish
cd ~
cp paper-client/config ~/.paper-client.conf
vim ~/.paper-client.conf
paper-client YOUR_POST.md
.paper-client.conf now needs two variable:
- key: the security key for post. see paper
- url: your domain
Format
Just markdown, but you should care about the code area. see the example.md
- File name of markdown file will be the post's title
- Markdown file must contains Tags: line at the top of file
- Post date is in paper settings
from https://github.com/yueyoum/paper-client
No comments:
Post a Comment