The Perfect Static Website Generator is the One You Write Yourself. Personal Blog of Johnny Law written in python3.
Source files of http://www.longjj.com and https://www.longjj.com
Error: Validation Failed
,修改 id
项完成时间戳和题目名同时作为 gitment id的兼容。I have tried some blog frameworks like Jekyll or Hexo. However, I am always spending lots of time reading doc for some functions. Once I found that making a static site generator is not difficult I decided to build my own blog. Beeblog has no complex plugins supports. I just implement some basic features I need. During the developing, I am learning docker and nginx.
I notice a code in the Internet and I think it's interesting while pretty right.
def shouldWriteOwnStaticGenerator(person):
if person.isPickyAboutTech():
return "Yes"
else:
return "Use Jekyll"
So here's Beeblog. I chose the name bumblebee when I was watching Transformers' films :). There is no other specific meaning.
Chinese Blog for More Detail: Why I implement BeeBlog
bumblebee.py
is a python3 static page generator. Use docker to build an image and run bumblebee.py
in a corresponding container. The nginx proxy in the container listens requests.
Notice: If you are not in China, maybe you don't need to change the software sources in
sources.list
.
Make sure you have installed docker in your system.
git clone https://github.com/longjj/BeeBlog
cd ./BeeBlog
make deploy
Then visit http://localhost:80 .
Notice: If you want to use https, you need to have your own ssl key and put the *.crt and *.key files in
/ssl_key
dir. Then change the config inlongjj.com.conf
to use your own ssl key.Notice: All article filenames in the
articles
dir should obtain the format "xxxx-xx-xx-xxx-xxx-xxx.md" cause my name parser depends on the file name format.
You can also use python3 bumblebee.py -c config_local.yml
command to test your static site generator.
You can use make update
to update your resources in the docker container faster.
I hope you can get refferences and inspiration from this repo. Welcome to fork it and try it by yourself. I recommend you to write your own blog as well. It's cool and you can practise a lot about docker, python3, nginx, web dev and even UI design, that is, a simple full stack development.
I will also maintain this repo, sometimes update my articles in the future.