Luca Nerlich A blog about Tech, Programming and Games.

How to contribute and write your own blog post

In this blog post, we will be discussing how you can write and publish your own post on this blog.

This Blog is running on Jekyll and therefore any post is written in Markdown (.md). Markdown “compiles” to html. It enables you to focus on writing your actual content, instead of having to think about specific html tags, syntax or styling.

Download a very helpful Markdown Cheatsheet here or here.

General

Every jekyll post starts with the following three lines:

---
layout: post
title: your posts title
category: yourcategory
language: eng / ger
permalink: /<seo_path>/
author: yourname
published: true
---

Dont not alter the layout, but DO change the title and set fitting categories. All posts will be listed on the page All Posts grouped by its category.

Publishing

If you want to publish a new post yourself, you will need an Account my GitLab Server. With this, you will be able to “clone” the complete project, update / add your files and push/reupload any changes.

Git and GitLab are used to version all project files and to rollback in case of any errors or mistakes. Git is very easy to use and learn, I will explain this in another post.

  1. Create your new post as a blank file in the _posts directory.
  2. Follow the naming scheme year-month-day-name.md e.g 2019-01-01-new-post.md.
  3. Write your posts content using the markdown syntax.
  4. Push your changes to the repository.
  5. If you have only added a new post, a simple git pull on our server is fine.
    • I might add a cron job in the future, so that we can skip this step.
    • If you have made structural changes, Jekyll will need to rebuild. Run the command ive detailed in this post.
  6. Your new post will be live immediately.

Thanks!

luca

category

howto