<commit_before>---
title: Blogging with Jekyll and GitHub pages
layout: post
---
Last Monday I completely broke up my blog. It was a custom homemade engine using ASP.NET MVC hosted on an Apache server, parsing markdown files to serve Razor powered views.

It was nice, but I updated the server and it just stopped working. The site was up but no posts were found. I think it was the signal: having a custom engine is fun and challenging, but **for a blog does it worth reinventing the wheel again?**

(You can still the .NET engine on [github](https://github.com/Valryon/valryon.github.io/tree/asp.net-mvc))

So I just switch to **Jekyll** for the server and **GitHub Pages** for hosting.

# Write in markdown

As I already did with my homemade engine, I am now writing posts in markdown files stored in a GitHub repo. [See this post as markdown](https://github.com/Valryon/valryon.github.io/blob/master/_posts/2013-04-08-blogging-with-jekyll-and-github-pages.md).

Markdown is great, simple, easy to parse and even to read. And you can still add some HTML in it for images or videos.

You can find some great editors as [MarkdownPad](http://markdownpad.com/) on Windows or [Mou](http://mouapp.com/) for OS.X.

# Layouts, feeds, etc

Jekyll is smart. It will look at each files you feed him with and try to transform it with rules.

Posts, for example, have a simple header like this:

```
---
title: Blogging with Jekyll and GitHub pages
layout: post
---
```
<commit_msg>Post header<commit_after>---
title: Blogging with Jekyll and GitHub pages
layout: post
---
Last Monday I completely broke up my blog. It was a custom homemade engine using ASP.NET MVC hosted on an Apache server, parsing markdown files to serve Razor powered views.

It was nice, but I updated the server and it just stopped working. The site was up but no posts were found. I think it was the signal: having a custom engine is fun and challenging, but **for a blog does it worth reinventing the wheel again?**

(You can still the .NET engine on [github](https://github.com/Valryon/valryon.github.io/tree/asp.net-mvc))

So I just switch to **Jekyll** for the server and **GitHub Pages** for hosting.

# Write in markdown

As I already did with my homemade engine, I am now writing posts in markdown files stored in a GitHub repo. [See this post as markdown](https://github.com/Valryon/valryon.github.io/blob/master/_posts/2013-04-08-blogging-with-jekyll-and-github-pages.md).

Markdown is great, simple, easy to parse and even to read. And you can still add some HTML in it for images or videos.

You can find some great editors as [MarkdownPad](http://markdownpad.com/) on Windows or [Mou](http://mouapp.com/) for OS.X.

# Layouts, feeds, etc

Jekyll is smart. It will look at each files you feed him with and try to transform it with rules.

Posts, for example, have a simple header like this:

<script src="https://gist.github.com/Valryon/5335230.js"></script>

{'fraction_non_alphanumeric': 0.0879045996592845, 'fraction_numerical': 0.007836456558773424, 'mean_word_length': 3.934453781512605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3869216', 'n_tokens_mistral': 893, 'n_tokens_neox': 847, 'n_words': 428}