diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2018-02-18 01:39:54 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2018-02-18 02:31:58 +0300 |
commit | 3f86aa8f02ab3c13f636934f5fdb560d84339bce (patch) | |
tree | eae46f24870172e3c5e21be38ff37f23ebe61742 | |
parent | bump dependencies (diff) | |
download | jekyll-theme-3f86aa8f02ab3c13f636934f5fdb560d84339bce.tar.gz jekyll-theme-3f86aa8f02ab3c13f636934f5fdb560d84339bce.zip |
enable post categories
-rw-r--r-- | _layouts/category.html | 19 | ||||
-rw-r--r-- | _layouts/post.html | 2 | ||||
-rw-r--r-- | _posts/2015-07-03-std-call-once-bug.md | 1 | ||||
-rw-r--r-- | _posts/2017-01-07-building-boost.md | 1 | ||||
-rw-r--r-- | _posts/2017-06-24-static-vs-inline-vs-unnamed-namespaces.md | 3 | ||||
-rw-r--r-- | c++/index.html | 5 | ||||
-rw-r--r-- | css/common/misc.css | 4 | ||||
-rw-r--r-- | index.html | 2 |
8 files changed, 34 insertions, 3 deletions
diff --git a/_layouts/category.html b/_layouts/category.html new file mode 100644 index 0000000..dbb7825 --- /dev/null +++ b/_layouts/category.html @@ -0,0 +1,19 @@ +{% include common/header.html %} +<div class="row"> + <div class="col-md-8"> + <h1>{{ page.title }}</h1> + <p>This is a complete list of posts in the "{{ page.category }}" category.</p> + {% if site.categories[page.category].size > 0 %} + <ul> + {% for post in site.categories[page.category] %} + <li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li> + {% endfor %} + </ul> + {% else %} + {% endif %} + </div> + <div class="col-md-4"> + {% include common/sidebar.html %} + </div> +</div> +{% include common/footer.html %} diff --git a/_layouts/post.html b/_layouts/post.html index 187b951..b01892f 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -2,7 +2,7 @@ <div class="row"> <div class="col-md-8"> <h1>{{ page.title }}</h1> - <p class="text-muted"><span class="glyphicon glyphicon-time"></span> Posted on {{ page.date | date_to_long_string }}</p> + <p class="text-muted"><span class="glyphicon glyphicon-time"></span> Posted on {{ page.date | date_to_long_string }}{% if page.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a href="{{ site.baseurl }}/{{ page.category | downcase }}/">{{ page.category }}</a>{% endif %}</p> {{ content }} <hr/> </div> diff --git a/_posts/2015-07-03-std-call-once-bug.md b/_posts/2015-07-03-std-call-once-bug.md index 5bf276f..ea69439 100644 --- a/_posts/2015-07-03-std-call-once-bug.md +++ b/_posts/2015-07-03-std-call-once-bug.md @@ -5,6 +5,7 @@ excerpt: > In this post I will describe a nasty bug I've stumbled upon in the C++ Standard Library implementation shipped with Microsoft Visual Studio 2012/2013. +category: C++ custom_css: - syntax.css --- diff --git a/_posts/2017-01-07-building-boost.md b/_posts/2017-01-07-building-boost.md index 4e28669..ba55ebe 100644 --- a/_posts/2017-01-07-building-boost.md +++ b/_posts/2017-01-07-building-boost.md @@ -4,6 +4,7 @@ layout: post excerpt: > This post describes the process of building Boost on Windows using either Visual Studio or the combination of Cygwin + MinGW-w64. +category: C++ custom_css: - syntax.css --- diff --git a/_posts/2017-06-24-static-vs-inline-vs-unnamed-namespaces.md b/_posts/2017-06-24-static-vs-inline-vs-unnamed-namespaces.md index 8094c3d..6f9f3dc 100644 --- a/_posts/2017-06-24-static-vs-inline-vs-unnamed-namespaces.md +++ b/_posts/2017-06-24-static-vs-inline-vs-unnamed-namespaces.md @@ -4,6 +4,7 @@ layout: post excerpt: > Should I use <code>static</code>, <code>inline</code> or unnamed namespaces for function definitions? +category: C++ custom_css: - snippets.css - syntax.css @@ -154,7 +155,7 @@ name, but are defined in different translation units. {: .alert .alert-info } `namespace {` ------------------- +------------- With respect to function definitions, unnamed namespaces are, according to my understanding, quite similar to the `static` keyword. diff --git a/c++/index.html b/c++/index.html new file mode 100644 index 0000000..ed18c1a --- /dev/null +++ b/c++/index.html @@ -0,0 +1,5 @@ +--- +title: C++ +category: C++ +layout: category +--- diff --git a/css/common/misc.css b/css/common/misc.css index edca6b0..bb6f791 100644 --- a/css/common/misc.css +++ b/css/common/misc.css @@ -44,3 +44,7 @@ code { padding: 0; background-color: inherit; } +/* Don't color category links blue. */ +.text-muted a { + color: inherit; +} @@ -12,7 +12,7 @@ root_page: true {% else %} {% for post in paginator.posts %} <h2><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h2> - <p class="text-muted"><span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date_to_long_string }}</p> + <p class="text-muted"><span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date_to_long_string }}{% if post.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a href="{{ site.baseurl }}/{{ post.category | downcase }}/">{{ post.category }}</a>{% endif %}</p> <p>{{ post.excerpt }}</p> <hr/> {% endfor %} |