My Blogging Journey

June 24, 2016   

Hugo

(2016 June - Current)

Like

  • Implemented in Go.
  • Host the website in Amazon S3 or similar service.
  • Keep Backup on git server.
  • Easy to extend.
  • Support TOC out of the box.
  • Available offline.
hugo server --theme=hugo-zen --buildDrafts --watch

Go 1.6: Add block feature in template. It is like Django block in template. which is a huge advantage to implement easy themes.

Ghost

(2013 NOVEMBER - 2016 June) Ghost is my blogging engine. It is very pretty and great.

Like

  • Good editor
  • Easy to use
  • Simple
  • Good default theme

Dislike

  • Not very easy to upgrade
  • Does not support TOC for long article.
  • Manual backup from the GUI or SQLite Backup
  • Implemented in node. Javascript’s world is changing so fast.

This is a shortcut for me, The ghost backup folder has already created for me based on this.

Docker

# install docker
wget -qO- https://get.docker.com/ | sh
sudo docker pull ghost
# from mac on the backup folder run this
# scp -r ghost yr.sa:
cd ghost
sudo ./start.sh

Create service

sudo vim /etc/init/docker-ghost.conf
# write these lines
description "Docker container for Ghost Blog"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
script
      exec docker run -d -p 2368:2368 -v /home/yaser/ghost:/ghost-override dockerfile/ghost
end script

sudo start docker-ghost

Update:

sudo docker ps -a -q | sudo xargs docker rm
sudo docker rmi dockerfile/ghost
sudo docker pull dockerfile/ghost

Or use regular installation instead of Docker:

curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install --yes nodejs

curl -L https://ghost.org/zip/ghost-latest.zip -o ghost.zip
unzip -uo ghost.zip -d ~/ghost

Configuration init-script Follow this

Web Server (Nginx)

$ sudo vi /etc/nginx/sites-enabled/ghost.conf

server {
    listen 80;
    server_name yr.sa www.yr.sa;
    location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $http_host;
        proxy_pass         http://127.0.0.1:2368;
    }
}

Enable Comments: (Disqus) Use this guide

Pelican

(2013 February - 2013 NOVEMBER)

Pelican is very great tool for generating static site using python.

Checkout the features of Pelican on their official site

Advantages:

  • easy to understand
  • easy to enhance
  • easy to develop templates with Jinja2
  • easy to configure, just one config file
  • well documented
  • written in python

For getting started checkout the official documentation they have good one.

Static site is very efficient. You can use it for your blog and uses disqus for comments

These are some commands:

  • rsync changes to the server
  make rsync_upload
  • Dealing with themes:

    • Install theme
    pelican-themes -vi path/to/theme/folder
    
    • list themes
    pelican-themes -v -l
    
    • remove a theme
    pelican-themes -r name_of_the_theme
    

Octopress

(2013 January - 2013 February)

I did not use it too long. I have switched to Pelican. I did not use it because I am familiar with python and I don’t want to install and use gem for ruby.

Jekyll

Experiment with it but did not use it.

Wordpress

(2012 September - 2013 January)

I did not create any real blogs with it but it was more of experimental of writing and checking blog tools.

References:



comments powered by Disqus