-
Notifications
You must be signed in to change notification settings - Fork 39
Getting started
Before you can write your blogpost and get started, you first need to follow some steps. If needed, you can ask Birgit or Christina for help at any time.
- Fork the epages-devportal repository.
- Clone the forked repository.
$ git clone [email protected]:YOUR_USER_NAME/epages-devportal.git
- If you don't have Ruby installed on your device, install Docker for Mac or for Windows. Otherwise, you'll be just fine with Ruby.
-
Create a dedicated branch for your blog post. This way you can keep a good overview in your project and you can separate different tasks.
-
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. -
Store your file in
/_posts/20xx/
. -
Navigate to the DevPortal folder in your terminal. This heavily depends on your personal set up and folder structure. Here's an example how it could look like
$ /Users/Christina/Projects/epages-devportal
5a. If you work with Docker, open the application on your device. Then run
$ docker-compose up -d
This may take a while, especially when you use Docker for the first time. Once the server is running, 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.
After checking the preview of your post, you should also check whether all tests pass. To do so, run
$ docker-compose exec --privileged jekyll rake test
If some tests fail, these error handling guidelines might help.
You can stop Docker at any time, by running
$ docker-compose down
5b. If you do have Ruby installed, and thus, do not need to work with 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
After rendering your post, you should also check whether all tests pass. To do so, 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
If some tests fail, these error handling guidelines might help.
- After your post passed all tests, make a pull request on the master branch.