mere-blog-theme 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c83319d6fdf0d1dcba1894428d0514660ad909ae
4
- data.tar.gz: b95c795dd9ddd7cc0079ba3fd49205b5c2d77cba
3
+ metadata.gz: 0c1dd59ca33ca4b8c07aee9bc5e2e852649c0a64
4
+ data.tar.gz: 24de007ab5842c78c6af80b9ee5793251c3de4c5
5
5
  SHA512:
6
- metadata.gz: b5fecfc5860f760041b0c6f6a4dda0f4bb6b2c09548d65e57c29bdcbb87c8569b9e16af08bfa5d2b0db672d710fed25c385cbc7f0c85434cf00773387a43e243
7
- data.tar.gz: 14e75c9099197279c2e26c219e3a60393aa5ee9569014a84070338ea82e394c4378456c7c01b9e71e7b126286512ac57d7c7567cdd923e700764ea7be916a489
6
+ metadata.gz: 93877dc8c5a12edfa5255f6c89e3901a91e032348c09c347eef9bdad7868f074498f306a3b6ab908f819a0de591b387f3b6502596cd58f84a1e021219dd0385a
7
+ data.tar.gz: 7ff0c9d7d7ab7d633688715dab132a42e84b60b320cecc5aba2eea184a292403de215ed57a02a424d297cf8c9fcd240805fe6d37764c9c6e0024e5b0949112cc
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # mere-blog-theme
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/mere-blog-theme.svg)](https://badge.fury.io/rb/mere-blog-theme)
4
+ ![Gem](https://img.shields.io/gem/dt/mere-blog-theme)
5
+
3
6
  Mere is a minimal and simple blog theme, and nothing more, for use with Jekyll and GitHub Pages. It has been built with the Bulma frontend framework.
4
7
 
5
8
  It has a homepage which displays the latest 6 posts and a paginated blog page used to list out all blog posts.
@@ -32,6 +35,7 @@ Or install it yourself as:
32
35
  * [Blog Setup](#blog-setup)
33
36
  * [Posts](#posts)
34
37
  * [Homepage](#homepage)
38
+ * [Authors](#authors)
35
39
  * [Google Analytics](#google-analytics)
36
40
 
37
41
  ### Blog Setup
@@ -75,6 +79,44 @@ image: /img/home.jpg
75
79
  hero_height: is-large
76
80
  ```
77
81
 
82
+ ### Authors
83
+
84
+ To enable the authors section, create a directory named `_authors` and create a page for each author within it. The author pages should have front matter in the following format.
85
+
86
+ **NOTE** The author name should match the author name in their posts exactly.
87
+
88
+ ```yaml
89
+ layout: author
90
+ title: The authors page title
91
+ name: Author Name
92
+ position: Web Designer
93
+ description: The short description of the author
94
+ avatar: /img/avatar.png
95
+ website: https://www.csrhymes.com
96
+ ```
97
+
98
+ The website and avatar are optional, but if you are stuck for author images, why not try [https://getavataaars.com](https://getavataaars.com). Square images work best. You can then write about the author in the page content.
99
+
100
+ Next, create an `authors.md` page in the root of your site and set the layout to authors.
101
+
102
+ ```yaml
103
+ layout: authors
104
+ title: Authors
105
+ description: The authors page
106
+ ```
107
+
108
+ Add authors as a collection in your _config.yml file with output set to true so the pages are generated.
109
+
110
+ ```yaml
111
+ collections:
112
+ authors:
113
+ output: true
114
+ ```
115
+
116
+ When you build your site, the authors link will appear in the navbar. The authors page will display the authors you have added. You can then click on their name or image to view the author page, along with a list of their 4 latest posts.
117
+
118
+ There will also be a link back to the authors page at the bottom of the post.
119
+
78
120
  ### Google Analytics
79
121
 
80
122
  To enable Google Analytics add `google_analytics: UA-xxxxxxxx` to your `_config.yml` replacing the UA-xxxxxxxx with your Google Analytics property.
@@ -0,0 +1,24 @@
1
+ <div class="author-media">
2
+ <div class="media">
3
+ <figure class="media-left">
4
+ <a href="{{ author.url | prepend: site.baseurl }}">
5
+ <p class="image is-64x64">
6
+ {% if author.avatar %}
7
+ <img src="{{ author.avatar | prepend: site.baseurl }}" alt="{{ author.name }}" />
8
+ {% else %}
9
+ <i class="fas fa-user fa-4x"></i>
10
+ {% endif %}
11
+ </p>
12
+ </a>
13
+ </figure>
14
+ <div class="media-content">
15
+ <a href="{{ author.url | prepend: site.baseurl }}">
16
+ <p class="title is-5">{{ author.name }}</p>
17
+ </a>
18
+ <p class="subtitle is-5">{{ author.position }}</p>
19
+ <div class="content">
20
+ <p>{{ author.description }}</p>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
@@ -13,6 +13,9 @@
13
13
  <div class="navbar-menu" id="navMenu">
14
14
  <div class="navbar-end">
15
15
  <a class="navbar-item" href="{{ site.baseurl }}/blog/">Blog</a>
16
+ {% if site.authors %}
17
+ <a class="navbar-item" href="{{ site.baseurl }}/authors/">Authors</a>
18
+ {% endif %}
16
19
  </div>
17
20
  </div>
18
21
  </div>
@@ -0,0 +1,52 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% assign page.title = page.name %}
5
+
6
+ <div class="columns is-multiline">
7
+ <div class="column is-3">
8
+ {% if page.avatar %}
9
+ <p class="image is-square">
10
+ <img src="{{ page.avatar | prepend: site.baseurl }}" alt="{{ page.name }}" />
11
+ </p>
12
+ {% else %}
13
+ <div class="has-text-centered">
14
+ <i class="fas fa-user fa-4x"></i>
15
+ </div>
16
+ {% endif %}
17
+ </div>
18
+ <div class="column">
19
+ <p class="title is-4">{{ page.name }}</p>
20
+ <p class="subtitle is-4 is-gapless">{{ page.position }}</p>
21
+
22
+ {% if page.website %}
23
+ <p class="subtitle is-6"><a href="{{ page.website }}" title="Author Website">{{ page.website }}</a></p>
24
+ {% endif %}
25
+ <div class="content">
26
+ {{ content }}
27
+ </div>
28
+
29
+ <p class="title is-5">Latest Posts</p>
30
+ <div class="columns is-multiline">
31
+ {% assign filtered_posts = site.posts | where: 'author', page.name %}
32
+ {% for post in filtered_posts limit: 4 %}
33
+ <div class="column is-12">
34
+ <div class="card">
35
+ <div class="card-content">
36
+ <p class="title is-5">{{ post.title }}</p>
37
+ <p class="subtitle is-6">Published {{ post.date | date: "%b %-d, %Y" }} by {{ post.author }}</p>
38
+
39
+ <div class="content">
40
+ {{ post.excerpt | strip_html | strip_newlines | truncate: 100 }}
41
+ </div>
42
+ <a href="{{ post.url | prepend: site.baseurl }}" class="button is-dark is-fullwidth">Read more</a>
43
+ </div>
44
+ </div>
45
+ <p class="title"></p>
46
+ </div>
47
+ {% endfor %}
48
+ </div>
49
+ </div>
50
+ </div>
51
+
52
+
@@ -0,0 +1,15 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div class="content">
6
+ {{ content }}
7
+ </div>
8
+
9
+ <div class="columns is-multiline">
10
+ {% for author in site.authors %}
11
+ <div class="column is-12">
12
+ {% include author-media.html %}
13
+ </div>
14
+ {% endfor %}
15
+ </div>
@@ -3,7 +3,9 @@
3
3
  {% include head.html %}
4
4
  <body>
5
5
  {% include navbar.html %}
6
- {% include hero.html %}
6
+ {% unless page.hide_hero %}
7
+ {% include hero.html %}
8
+ {% endunless %}
7
9
  <section class="section">
8
10
  <div class="container">
9
11
  {{ content }}
data/_layouts/post.html CHANGED
@@ -12,3 +12,8 @@ layout: default
12
12
  <span class="tag is-primary">{{ tag }}</span>
13
13
  {% endfor %}
14
14
  </div>
15
+
16
+ {% assign author = site.authors | where: 'name', page.author | first %}
17
+ {% if author %}
18
+ {% include author-media.html %}
19
+ {% endif %}
data/_sass/_layout.scss CHANGED
@@ -23,3 +23,8 @@ div.highlight {
23
23
  }
24
24
  }
25
25
  }
26
+
27
+ .author-media {
28
+ padding: 1.5rem;
29
+ background: $light;
30
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mere-blog-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrisrhymes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-08 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -145,6 +145,7 @@ extra_rdoc_files: []
145
145
  files:
146
146
  - LICENSE.txt
147
147
  - README.md
148
+ - _includes/author-media.html
148
149
  - _includes/google-analytics.html
149
150
  - _includes/head-scripts.html
150
151
  - _includes/head.html
@@ -152,6 +153,8 @@ files:
152
153
  - _includes/navbar.html
153
154
  - _includes/pagination.html
154
155
  - _includes/post-item.html
156
+ - _layouts/author.html
157
+ - _layouts/authors.html
155
158
  - _layouts/blog.html
156
159
  - _layouts/default.html
157
160
  - _layouts/homepage.html