jianjieluo / BeeBlog

The Perfect Static Website Generator is the One You Write Yourself! Dockerized Blog of Johnny Law
https://www.longjj.com
MIT License
2 stars 0 forks source link
blog blog-engine docker python3 static-site-generator

Note: This repository is deprecated, and the code is kept for reference about how to write a Static Website Generator.

BeeBlog

beeicons

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

Change Log

Why BeeBlog

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

How it works

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.

Try it

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 in longjj.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.

Refference

  1. How To Write A Static Site Generator gives me a basic concept about static page generator.
  2. Benjamin Cane's blog repo has pretty good code style and file structure and I learn a lot from his repo.
  3. Icon Refference.

About this repo

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.