hafizh / tech.zalando.com

Zalando Tech Blog

Home Page:http://tech.zalando.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zalando Technology public "Tech Blog"

This repository contains the source files for our public Tech Blog (tech.zalando.com).

Writing blog posts

Create (or copy) a ".rst" file in the "posts" folder. All new blog posts will be written in plain text reStructured Text format (very similar to Markdown, but extensible and therefore more powerful):

Please make sure your blog post contains all necessary meta information (in the header):

  • author name ("..author: Henning Jacobs")
  • teaser image ("..image: my-example-image.jpg")

Deploy the blog

You need Git and Docker to build static HTML (should also work now with latest version of boot2docker and Docker 1.3+):

Important: to deploy on tech.zalando.com your public ssh key needs to be deployed there first!

Clone the sources on your local machine (if not done already):

$ git clone https://github.com/zalando/tech.zalando.com.git
$ cd tech.zalando.com

Get latest changes from git repository:

$ git pull

Build the blog:

$ docker run -v $(pwd):/workdir -t zalando/nikola build

The generated HTML files are in the "output" directory.

You can also use the provided Makefile to achieve the same:

$ make clean
$ make

Deploy the blog to tech.zalando.com:

$ rsync -av -4 --no-owner --no-group --no-perms output/* root@tech.zalando.com:/data/www/tech.zalando.com/htdocs

Hints:

You can create aliases to make deployments even faster:

$ alias cleanblog="docker run -v `pwd`:/workdir -t zalando/nikola clean"
$ alias buildblog="docker run -v `pwd`:/workdir -t zalando/nikola build"
$ alias deployblog="rsync -av -4 --no-owner --no-group --no-perms output/* root@tech.zalando.com:/data/www/tech.zalando.com/htdocs"

Now you can deploy by just typing:

$ buildblog
$ deployblog

Editing files on Windows

Please see http://stackoverflow.com/questions/2746692/restructuredtext-tool-support for editor support.

About

Zalando Tech Blog

http://tech.zalando.com/


Languages

Language:CSS 64.6%Language:JavaScript 19.9%Language:Python 14.7%Language:Shell 0.7%Language:Makefile 0.1%