From e920f209fe488f4494b65748634af11db4e0d9ea Mon Sep 17 00:00:00 2001 From: Yehonal Date: Mon, 17 Dec 2018 23:08:14 +0100 Subject: Some improvements to blog system --- _config.yml.dist | 6 ++++++ _layouts/git-wiki-blog.html | 39 ++++++++++----------------------------- _sass/git-wiki-style.scss | 28 ++++++++++++++++++++++++++++ blog/index.html | 3 +-- 4 files changed, 45 insertions(+), 31 deletions(-) diff --git a/_config.yml.dist b/_config.yml.dist index bd8b83e..a8f0382 100644 --- a/_config.yml.dist +++ b/_config.yml.dist @@ -15,6 +15,7 @@ show_wiki_posts_limit: 10 # from jekyll (read jekyll doc) paginate: 5 paginate_path: "/blog/page:num" +permalink: /blog/posts/:year/:month/:day/:title:output_ext # (boolean) Enable/disable download buttons in sidebar show_downloads: true # (string) Specify branch rendered by gitpages allowing wiki tool buttons to work @@ -69,6 +70,11 @@ defaults: type: "posts" values: layout: "git-wiki-post" + - + scope: + path: blog + values: + layout: "git-wiki-blog" sass: style: compressed plugins: diff --git a/_layouts/git-wiki-blog.html b/_layouts/git-wiki-blog.html index 135c185..a934b72 100644 --- a/_layouts/git-wiki-blog.html +++ b/_layouts/git-wiki-blog.html @@ -2,39 +2,20 @@ title: Blog layout: git-wiki-default --- - {% for post in paginator.posts %} -

{{ post.id }}

-

- {{ post.date | date: "%-d %B %Y"}} -

-
- {{ post.excerpt }} +
+

+ {{ post.date | date: "%-d %B %Y"}} +

+
+ {{ post.excerpt }} - ...Read all -
+ ...Read all +
+
+
{% endfor %} diff --git a/_sass/git-wiki-style.scss b/_sass/git-wiki-style.scss index e3fb194..028781a 100644 --- a/_sass/git-wiki-style.scss +++ b/_sass/git-wiki-style.scss @@ -281,3 +281,31 @@ footer { color:#444; } } + +/* + Pagination rules +*/ + +.pagination a, .pagination span { + padding: 7px 18px; + border: 1px solid #eee; + margin-left: -2px; + margin-right: -2px; + background-color: #ffffff; + display: inline-block; +} + +.pagination a { + &:hover { + background-color: #f1f1f1; + color: #333; + } +} + +.pagination { + text-align: center; +} + +.post-item { + margin-bottom: 50px; +} \ No newline at end of file diff --git a/blog/index.html b/blog/index.html index f806d66..890703d 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1,4 +1,3 @@ --- -layout: git-wiki-blog ---- +--- \ No newline at end of file -- cgit