initial blog view

- added blog with all posts
This commit is contained in:
Hendrik Blöß committed 2017-08-06 12:39:13 +02:00
1 parent 41d8fc020f
commit 1b2ccde8d8
4 files changed
+73 -4

No files matched your search

+1
View File
@@ -21,5 +21,6 @@ gem "minima", "~> 2.0"
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-paginate"
gem "github-pages", "~> 111"
end
+3 -3
View File
@@ -64,7 +64,7 @@ post-preview-words: 80
big-post-preview-words: 200
excerpt_separator: <!--more-->
#paginate: 5
paginate: 5
################################################################################
@@ -87,7 +87,7 @@ exclude: ["LICENSE", "README.md", "CONTRIBUTING", "CONTRIBUTORS", "scripts"]
# Pagination path
paginate_path: "blog/page:num/"
paginate_path: "/blog/page:num/"
# Enable minification SASS
@@ -97,5 +97,5 @@ sass:
gems:
- github-pages
- jekyll-feed
#- jekyll-paginate
- jekyll-paginate
#- jemoji
+1 -1
View File
@@ -49,7 +49,7 @@
</div>
</div>
<p class="col-md-12 more">
<a href="#" class="btn btn-lg">
<a href="blog/" class="btn btn-lg">
<i class="fa fa-newspaper-o" aria-hidden="true"></i>
More News
</a>
+68
View File
@@ -0,0 +1,68 @@
---
layout: null
title: Blog
---
<!DOCTYPE html>
<html lang="{{ site.lang }}">
{% include head.html %}
<body data-spy="scroll" data-offset="20" data-target="#navbar">
{% include navigation.html %}
<section class="{{ page.section-type }}">
<div class="container">
<div class="row">
<!-- This loops through the paginated posts -->
{% for post in paginator.posts %}
<h1><a href="{{site.baseurl}}{{post.url}}">{{post.title}}</a></h1>
<div class="post-info">
<i class="fa fa-calendar" aria-hidden="true"></i> {{ post.date | date_to_long_string }}
<a href="https://github.com/{{ post.author }}" class="author-link">
<img class="avatar" src="https://github.com/{{ post.author }}.png?size=18" alt="{{ post.author }}">
{{ post.author }}
</a>
{% for tag in post.tags %}
<div class="chip blue-bg">
{{ tag }}
</div>
{% endfor %}
</div>
<div>
{{post.excerpt | markdownify }}
</div>
{% endfor %}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
{% else %}
<span>&laquo; Prev</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<em>{{ page }}</em>
{% elsif page == 1 %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
{% else %}
<span>Next &raquo;</span>
{% endif %}
</div>
{% endif %}
</div>
</div>
</section>
</body>
</html>