Skip to content

Commit

Permalink
Separate English from German blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Apr 21, 2017
1 parent c5ea73a commit 844b5b1
Show file tree
Hide file tree
Showing 33 changed files with 274 additions and 121 deletions.
9 changes: 9 additions & 0 deletions 404.html
@@ -0,0 +1,9 @@
---
title: Page Not Found
subtitle: HTTP 404
permalink: 404.html
---

<div class="alert alert-danger" role="alert"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Sorry, this page does not exist.</div>

<p><a href="{{ site.baseurl }}/" class="btn btn-lg btn-success">Start Over <i class="fa fa-chevron-right"></i></a></p>
23 changes: 20 additions & 3 deletions _config.yml
Expand Up @@ -14,10 +14,27 @@ highlighter: rouge
permalink: /blog/:year/:month/:day/:title/
excerpt_separator: "<!--more-->"

paginate: 8
paginate_path: "/blog/page:num/"
defaults:
-
scope:
path: ""
values:
lang: en
-
scope:
path: ""
type: "posts"
values:
is_post: true
layout: post
-
scope:
path: ""
type: "pages"
values:
layout: page

exclude: [ Gemfile, contact.html, portfolio.html ]
exclude: [ Gemfile, en/contact.html, en/portfolio.html, de/ueber-mich.md ]

# Piwik
piwik_url: web864.we20e.netcup.net/piwik
Expand Down
18 changes: 18 additions & 0 deletions _data/translations.yml
@@ -0,0 +1,18 @@
en:
name: "English"
index:
blog:
index:
date_format: "%b %-d, %Y"
read_on: Read on
subscribe: Subscribe
via_rss: via RSS
de:
name: "Deutsch"
index: /de/blog/
blog:
index: /de/blog/
date_format: "%d.%m.%Y"
read_on: Weiterlesen
subscribe: Abonnieren
via_rss: per RSS
14 changes: 14 additions & 0 deletions _includes/blog_index.html
@@ -0,0 +1,14 @@
{% assign translation = site.data.translations[page.lang] %}
{% assign posts = site.posts | where:"lang", page.lang %}
{% for post in posts %}
<h2 class="post-title"><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> <small class="post-date">{{ post.date | date: site.data.translations[page.lang].blog.date_format }}</small></h2>
{{ post.excerpt }}
<p><a href="{{ post.url | prepend: site.baseurl }}" class="btn btn-success">{{ translation.blog.read_on }} <i class="fa fa-chevron-right"></i></a></p>
{% unless forloop.last %}
<hr>
{% endunless %}
{% endfor %}

<hr>

<p>{{ translation.blog.subscribe }} <a href="{{ "/feed.xml" | prepend: site.baseurl }}">{{ translation.blog.via_rss }}</a></p>
2 changes: 1 addition & 1 deletion _includes/footer.html
Expand Up @@ -18,6 +18,6 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<script>
$('.navbar-social-links a').tooltip();
$('li.social a').tooltip();
</script>
{% include piwik_analytics.html %}
5 changes: 5 additions & 0 deletions _includes/head.html
Expand Up @@ -21,4 +21,9 @@
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<meta name="theme-color" content="#ffffff">

{% assign posts = site.posts | where:"ref", page.ref | where_exp:"item", "item.id != page.id" %}{% for post in posts %}
<link rel="alternate" hreflang="{{ post.lang }}" href="{{ post.url }}" />{% endfor %}
{% assign pages=site.pages | where:"ref", page.ref | where_exp:"item", "item.url != page.url" %}{% for page in pages %}
<link rel="alternate" hreflang="{{ page.lang }}" href="{{ page.url }}" />{% endfor %}
</head>
30 changes: 21 additions & 9 deletions _includes/header.html
Expand Up @@ -8,25 +8,37 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ site.baseurl }}/">{{ site.title }}</a>
<a class="navbar-brand" href="{{ site.data.translations[page.lang].index | prepend: site.url }}">{{ site.title }}</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav navbar-main">
{% assign sorted_pages = (site.pages | where: 'group', 'navigation' | sort: 'weight') %}
{% for node in sorted_pages %}
{% unless node.url contains 'page' %}
{% if node.url == page.url or node.url == page.nav_url %}
{% if node.lang == page.lang %}
{% if node.url == page.url or node.url == page.nav_url or (page.is_post and node.is_blog_index)%}
<li class="active">
{% else %}
<li>
{% endif %}
<a href="{{ node.url | prepend: site.baseurl | replace:'index.html','' }}">{{ node.title }}</a></li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
<ul class="nav navbar-nav navbar-right navbar-social-links hidden-xs">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ site.data.translations[page.lang].name }} <span class="caret"></span></a>
<ul class="dropdown-menu">
{% if page.is_post %}
{% include translations-list-items.html pages=site.posts %}
{% else %}
{% include translations-list-items.html pages=site.pages %}
{% endif %}
</ul>
</li>
{% comment %}
<li class="email">
<li class="social email hidden-xs">
<a href="{{ "/contact/" | prepend: site.baseurl }}" data-toggle="tooltip" data-placement="bottom" title="Email me">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x background"></i>
Expand All @@ -35,31 +47,31 @@
</a>
</li>
{% endcomment %}
<li class="twitter">
<li class="social twitter hidden-xs">
<a href="http://twitter.com/marcphilipp" data-toggle="tooltip" data-placement="bottom" title="@marcphilipp on Twitter">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x background"></i>
<i class="fa fa-twitter fa-stack-1x fa-lg foreground"></i>
</span>
</a>
</li>
<li class="github">
<li class="social github hidden-xs">
<a href="http://github.com/marcphilipp" data-toggle="tooltip" data-placement="bottom" title="marcphilipp on GitHub">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x background"></i>
<i class="fa fa-github fa-stack-1x fa-lg foreground"></i>
</span>
</a>
</li>
<li class="xing">
<li class="social xing hidden-xs">
<a href="https://www.xing.com/profile/Marc_Philipp9" data-toggle="tooltip" data-placement="bottom" title="Marc Philipp on Xing">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x background"></i>
<i class="fa fa-xing fa-stack-1x fa-lg foreground"></i>
</span>
</a>
</li>
<li class="linkedin">
<li class="social linkedin hidden-xs">
<a href="http://www.linkedin.com/in/marcphilipp" data-toggle="tooltip" data-placement="bottom" title="Marc Philipp on LinkedIn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x background"></i>
Expand Down
12 changes: 12 additions & 0 deletions _includes/translations-list-items.html
@@ -0,0 +1,12 @@
{% for translation in site.data.translations %}
{% assign lang = translation[0] %}
{% assign node = (include.pages | where: 'ref', page.ref | where: 'lang', lang | sample %}
{% if node and (node.url == page.url or node.url == page.nav_url) %}
<li class="active">
{% elsif node == nil %}
<li class="disabled">
{% else %}
<li>
{% endif %}
<a href="{{ node.url | prepend: site.baseurl | replace:'index.html','' }}">{{ translation[1].name }}</a></li>
{% endfor %}
2 changes: 1 addition & 1 deletion _layouts/default.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ page.lang }}">

{% include head.html %}

Expand Down
5 changes: 4 additions & 1 deletion _layouts/page.html
Expand Up @@ -4,7 +4,10 @@

<div class="jumbotron">
<div class="container">
<h1>{{ page.title }}</h1>
<h1>
{{ page.title }}
{% if page.subtitle %}<small>{{ page.subtitle }}</small>{% endif %}
</h1>
</div>
</div>

Expand Down
17 changes: 10 additions & 7 deletions _layouts/post.html
Expand Up @@ -4,7 +4,7 @@

<div class="jumbotron">
<div class="container">
<h1>{{ page.title }} <small class="post-date">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</small></h1>
<h1>{{ page.title }} <small class="post-date">{{ page.date | date: site.data.translations[page.lang].blog.date_format }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</small></h1>
</div>
</div>

Expand All @@ -13,20 +13,23 @@ <h1>{{ page.title }} <small class="post-date">{{ page.date | date: "%b %-d, %Y"
{{ content }}
</article>

{% if page.previous or page.next %}
{% assign relevant_posts = site.posts | where: 'lang', page.lang | where_exp: 'item', 'item.ref != page.ref' %}
{% assign previous = relevant_posts | where_exp: 'item', 'item.date < page.date' | sample %}
{% assign next = relevant_posts | where_exp: 'item', 'item.date > page.date' | reverse | sample %}
{% if previous or next %}
<nav class="text-center">
<ul class="pagination">
{% if page.previous %}
<li><a href="{{ page.previous.url | prepend: site.baseurl }}"><span aria-hidden="true"><i class="fa fa-chevron-left"></i></span> {{ page.previous.title }}</a></li>
{% if previous %}
<li><a href="{{ previous.url | prepend: site.baseurl }}"><span aria-hidden="true"><i class="fa fa-chevron-left"></i></span> {{ previous.title }}</a></li>
{% endif %}
{% if page.next %}
<li><a href="{{ page.next.url | prepend: site.baseurl }}">{{ page.next.title }} <span aria-hidden="true"><i class="fa fa-chevron-right"></i></span></a></li>
{% if next %}
<li><a href="{{ next.url | prepend: site.baseurl }}">{{ next.title }} <span aria-hidden="true"><i class="fa fa-chevron-right"></i></span></a></li>
{% endif %}
</ul>
</nav>
{% endif %}

{% if site.disqus_short_name and page.comments == true %}
{% if site.disqus_short_name and page.comments %}
<section class="comments">
{% include disqus_thread.html %}
</section>
Expand Down
3 changes: 2 additions & 1 deletion _posts/2010-02-13-experimenting-with-theories.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Experimenting with Theories"
date: 2010-02-13 14:04
comments: true
categories: [JUnit]
lang: en
ref: post-experimenting-with-theories
---

The very first 4.x release of JUnit contained support for custom test runners. Moreover, it came with the `Parameterized` test runner that allows to execute the test cases in a test class against a collection of values, i.e. parameters.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2010-02-16-generic-matcher-pitfalls.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Generic Matcher Pitfalls"
date: 2010-02-16 22:45
comments: true
categories: [JUnit, Hamcrest]
lang: en
ref: post-generic-matcher-pitfalls
---

Using [Hamcrest](http://code.google.com/p/hamcrest/) matchers in combination with `assertThat` allows for more fluid specification of JUnit assertions.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2010-03-13-applying-dry-to-junit-categories.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Applying DRY to JUnit Categories"
date: 2010-03-13 22:08
comments: true
categories: [JUnit]
lang: en
ref: post-applying-dry-to-junit-categories
---

Long awaited, [JUnit 4.8](http://junit.org/junit4/doc/ReleaseNotes4.8.html) introduced support for categorizing test cases.
Expand Down
@@ -1,9 +1,10 @@
---
layout: post
title: "Combining SuiteBuilder and ClasspathSuite"
date: 2010-05-13 13:05
comments: true
categories: [JUnit]
lang: en
ref: post-combining-suitebuilder-and-classpathsuite
---

In a recent [commit](http://github.com/junit-team/junit/commit/f09cff79b941a525271f3f2838a9742b4c5c8d36) to JUnit Kent Beck and David Saff have added an "alpha-ready implementation of `SuiteBuilder`". As Kent Beck previously described in a [blog post](http://www.threeriversinstitute.org/blog/?p=456), the idea behind the `SuiteBuilder` runner is to use annotations on fields instead of annotations on classes.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2010-11-16-primitive-matt-ch-ers.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Primitive Matt(ch)ers?"
date: 2010-11-16 20:34
comments: true
categories: [JUnit, Hamcrest]
lang: en
ref: post-primitive-matchers
---

The [Hamcrest project](http://code.google.com/p/hamcrest/) provides a large number of matchers, i.e. declaratively defined predicates. Prominent uses of these matchers include testing and mocking libraries like JUnit and jMock, respectively.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2011-12-22-junit-rules.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "JUnit Rules"
date: 2011-12-22 14:24
comments: true
categories: [JUnit]
lang: de
ref: post-junit-rules
---

Marc Philipp, andrena objects ag
Expand Down
3 changes: 2 additions & 1 deletion _posts/2012-03-13-database-tests-with-dbunit-part-1.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Database Tests With DbUnit (Part 1)"
date: 2012-03-13 21:00
comments: true
categories: [DbUnit, JUnit]
lang: en
ref: post-db-unit-part1
---

Inspired by a recent [blog post](http://blog.schauderhaft.de/2012/01/15/tipps-for-testing-database-code/) and [presentation](http://www.sigs-datacom.de/oop2012/konferenz/sessiondetails.html?tx_mwconferences_pi1%5BshowUid%5D=752&tx_mwconferences_pi1%5Banchor%5D=%23Mi64&tx_mwconferences_pi1%5Bs%5D=0) by [Jens Schauder](http://blog.schauderhaft.de/uber-jens-schauder/), this blog posts starts a series of posts about using [DbUnit](http://www.dbunit.org/) for database and integration tests. In addition, I will talk about [Database Tests with DbUnit](http://www.andrena.de/veranstaltungen/datenbanktests-mit-dbunit) at ObjektForum Karlsruhe in April. This first post introduces DbUnit and demonstrates how it can be used to write database tests.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2012-03-19-using-dbunit-without-xml.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Using DbUnit Without XML"
date: 2012-03-19 21:00
comments: true
categories: [DbUnit, JUnit]
lang: en
ref: post-db-unit-without-xml
---

In the [previous post](/blog/2012/03/13/database-tests-with-dbunit-part-1/) we have seen how to use DbUnit to write a simple database test. By using DbUnit for this purpose, we were able to insert a complete dataset into the database without writing SQL. However, we had to use XML to specify the dataset:
Expand Down
4 changes: 3 additions & 1 deletion _posts/2012-06-11-interview-with-uncle-bob.markdown
@@ -1,10 +1,12 @@
---
layout: post
title: "Interview with Uncle Bob"
date: 2012-06-11 21:25
comments: true
categories: [Software Craftsmanship]
lang: en
ref: post-interview-with-uncle-bob
---

A couple of weeks ago I had the pleasure to participate in [Uncle Bob](http://www.twitter.com/unclebobmartin)'s Clean Code course in Karlsruhe. Afterwards, I interviewed him together with [Susann Mathis](www.susann-mathis.de) on Software Craftsmanship and professionalism in software development.

In the meantime, the interview has been published in print in the [VKSI Magazine](http://www.vksi.de/fileadmin/downloads/magazin/VKSIMagazin_6.pdf) (PDF, German) and as a video on [YouTube](http://www.youtube.com/watch?v=OIHvp7WzuH0).
Expand Down
7 changes: 4 additions & 3 deletions _posts/2012-06-23-pecha-kucha-software-craftsmanship.markdown
@@ -1,16 +1,17 @@
---
layout: post
title: "Pecha Kucha: Software Craftsmanship"
date: 2012-06-23 13:15
comments: true
categories: [Software Craftsmanship]
lang: de
ref: post-pecha-kucha-software-craftsmanship
---

A little more than a month ago I spoke at the [Entwicklertag](http://entwicklertag.de/) in Karlsruhe about Software Craftsmanship. More precisely, I gave my very first Pecha Kucha on my understanding of the principles and ethics behind it.
Vor knapp einem Monat habe ich auf dem [Entwicklertag](http://entwicklertag.de/) in Karlsruhe meinen ersten _Pecha Kucha_ Kurzvortrag über Software Craftsmanship gehalten. Darin habe ich mein Verständnis der Prinzipien dargelegt und erläutert, was es m.E. bedeutet ein professioneller Softwareentwickler zu sein.

<!--more-->

Along with [several others](http://www.youtube.com/user/andrenaobjects), my talk was recorded and is now available on [YouTube](http://www.youtube.com/watch?v=oljTjizjKdM). Since the slides are a little hard to see in the video, I have uploaded them to [SpeakerDeck](https://speakerdeck.com/u/marcphilipp/p/pecha-kucha-software-craftsmanship).
Wie [einige andere](http://www.youtube.com/user/andrenaobjects), wurde mein Vortrag aufgezeichnet und ist auf [YouTube](http://www.youtube.com/watch?v=oljTjizjKdM) verfügbar. Da die Folien im Video schlecht zu sehen sind, habe ich sie auf [SpeakerDeck](https://speakerdeck.com/u/marcphilipp/p/pecha-kucha-software-craftsmanship) hochgeladen.

<div class="row">
<div class="col-md-6">
Expand Down
3 changes: 2 additions & 1 deletion _posts/2013-01-02-hamcrest-quick-reference.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "Hamcrest Quick Reference"
date: 2013-01-02 22:05
comments: true
categories: [Java, Hamcrest]
lang: en
ref: post-hamcrest-quick-reference
---

Recently, we have [released JUnit 4.11](https://github.com/junit-team/junit/blob/master/doc/ReleaseNotes4.11.md) which now uses the latest version of [Hamcrest](http://hamcrest.org/) (1.3). Being finally able to (easily) use the power of a recent version of the matchers that come with hamcrest-core and hamcrest-library along with JUnit, I have been looking for a decent-looking printable quick reference of available matchers. Since I wasn't able to find any, I have decided to create my own.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2016-07-09-junit5-m1.markdown
@@ -1,9 +1,10 @@
---
layout: post
title: "JUnit 5 M1"
date: 2016-07-09 20:38
comments: true
categories: [Java, JUnit]
lang: en
ref: post-junit5-m1
---

I am resurrecting this blog for a very special occasion: we, the JUnit 5 team, have released the first milestone of [JUnit 5](http://junit.org/junit5/) this Thursday. A tremendous amount of work has been completed since we shipped the alpha version in February: 138 issues have been resolved, 766 commits have been pushed to master. We had fruitful discussions with many contributors and early
Expand Down

0 comments on commit 844b5b1

Please sign in to comment.