Skip to content

Commit

Permalink
Change 'posts' into 'news'
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-ka committed Jun 12, 2020
1 parent ad8f22d commit 220824e
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 23 deletions.
12 changes: 6 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ exclude:
timezone: Europe/Berlin
defaults:
- scope:
path: _posts
type: posts
path: _news
type: news
values:
layout: post
sectionid: blog
layout: news
sectionid: news

- scope:
path: _docs
Expand All @@ -56,6 +56,6 @@ collections:
docs:
permalink: /:collection/:path/
output: true
posts:
permalink: /blog/:year/:month/:day/:title/
news:
permalink: /news/:year/:month/:day/:title/
output: true
2 changes: 1 addition & 1 deletion _includes/topnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<li {% if page.sectionid=='docs' %} class="active" {% endif %}><a href="{{ "/docs/home/" | prepend: site.baseurl }}">Documentation</a></li>
<li {% if page.sectionid=='project-background' %} class="active" {% endif %}><a href="{{ "/background-and-publications/" | prepend: site.baseurl }}">Project Background</a></li>
<li {% if page.sectionid=='getting-involved' %} class="active" {% endif %}><a href="{{ "/getting-involved/" | prepend: site.baseurl }}">Getting Involved</a></li>
<li {% if page.sectionid=='blog' %} class="active" {% endif %}><a href="{{ site.posts.first.url | prepend: site.baseurl }}">Blogposts</a></li>
<li {% if page.sectionid=='news' %} class="active" {% endif %}><a href="{{ site.news.last.url | prepend: site.baseurl }}">News</a></li>
</ul>
<div class="navbar-right">
<form class="navbar-form navbar-left">
Expand Down
9 changes: 5 additions & 4 deletions _layouts/post.html → _layouts/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

<div class="col-md-4">
<div class="well">
<h4>RECENT POSTS</h4>
<h4>Recent News</h4>
<ul class="list-unstyled post-list-container">
{% for post in site.posts limit:10 %}
<li><a href="{{ post.url | prepend: site.baseurl }}" {% if page.title==post.title %} class="active" {% endif %}>{{ post.title }}</a></li>
{% assign sorted_news = site.news | sort:"date" %}
{% for entry in sorted_news reversed limit:10 %}
<li><div>{{ entry.date | date: "%b %-d, %Y" }}</div><a href="{{ entry.url | prepend: site.baseurl }}" {% if page.title==entry.title %} class="active" {% endif %}>{{ entry.title }}</a></li>
{% endfor %}
<li><a href="{{ "/allposts" | prepend: site.baseurl }}">All posts ...</a></li>
<li><a href="{{ "/allnews" | prepend: site.baseurl }}">All news ...</a></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: post
layout: news
title: "First Context Mapper version released!"
author: Stefan Kapferer
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: post
layout: news
title: "Model Transformations for DSL Processing"
author: Stefan Kapferer
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: post
layout: news
title: "A Domain-specific Language for Service Decomposition"
author: Stefan Kapferer
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: post
layout: news
title: "Service Decomposition as a Series of Architectural Refactorings"
author: Stefan Kapferer
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: "A Modeling Framework for Strategic Domain-driven Design and Service Decomposition"
layout: news
title: "Master Thesis Published"
author: Stefan Kapferer
---

Expand Down
7 changes: 4 additions & 3 deletions allposts.html → allnews.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
---
title: Blog
title: News
layout: default
sectionid: blog
sectionid: news
---


<div class="container">
<div class="inner-content">
<h1>All Posts</h1> {% for page in site.posts %}
{% assign sorted_news = site.news | sort:"date" %}
<h1>All News</h1> {% for page in sorted_news reversed %}
<p>
<strong><a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a></strong>
<span>on {{ page.date | date: "%B %e, %Y" }} {% if page.author %} by {{ page.author }}{% endif %}</span>
Expand Down
3 changes: 3 additions & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ body {
}

.post-list-container {
li {
padding-bottom: 10px;
}
li a.active {
font-weight: bold;
}
Expand Down
6 changes: 3 additions & 3 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
{% endfor %}
{% endfor %}

{% for post in site.posts %}
{% for entry in site.news %}
{
"title": "{{ post.title | escape }}",
"url": "{{ post.url | prepend: site.baseurl }}"
"title": "{{ entry.title | escape }}",
"url": "{{ entry.url | prepend: site.baseurl }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]

0 comments on commit 220824e

Please sign in to comment.