Skip to content

Getting started

cgebken edited this page Dec 12, 2018 · 20 revisions

Before you can write your blogpost and get started, you need to follow these steps:

Only once:

  1. Fork the epages-devportal repository.
  2. Clone the forked repository.
$ git clone git@github.com:YOUR_USER_NAME/epages-devportal.git
  1. Install Docker for Mac or for Windows.

Everytime you write a blog post:

  1. Name your file according to the following structure: YYYY-MM-DD-the-title-of-your-post.md
    For example: 20xx-09-12-five-compelling-reasons-why-you-should-care-about-terminology.md
    Note: Use the date, the post will be published, NOT the date you start writing.

  2. Store your file in /_posts/20xx/.

  3. Enter the folder

$ cd epages-devportal

4a. Run the folder with

$ docker-compose up

--> Using this virtual machine, you do not have to install Ruby, Jekyll or anything else yourself.

If Docker doesn't work and it's not yet opened, enter

$ docker-compose up -d

If Docker is already open, just enter:

$ docker-compose exec --privileged jekyll rake test

Go to http://localhost:4000/ to preview your blogpost. To speed everything up, only the blog post of the previous and the current month were built.

Once you're done with everything and like to stop Docker, enter:

$ docker-compose down

4b. If you do have Ruby installed, and thus, do not need to work in Docker run

$ jekyll serve

Your post is now rendered. Go to http://localhost:4000/ to preview your post.

If you already edited the date in the front matter according to the future publication date, you need to run

$ jekyll serve --future
  1. After rendering your post, you should also check whether all tests pass. If you work with Docker, you need to have Docker running while doing so (see step 3. & 4a.). Run
$ rake test

If you only want to check single parts of your post, you can use one of the following commands:

To check links or the HTML site, use

$ rake test_html

To check the front matter, use

$ rake test_posts

To check your file name, use

$ rake test_files
  1. After your post passed all tests, make a pull request on the master branch.
Clone this wiki locally