jekyll-theme-editorial 1.0.3 → 1.0.8

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
  SHA256:
3
- metadata.gz: 3fddfecb7530906cfd7ea82547afece9f033e2d692751906a9f529b94fccef4d
4
- data.tar.gz: b2314084eaf1bed8eaee7ec9fec84f3ccc8d8dd1add5074ec7fb30e984a4c4bc
3
+ metadata.gz: 467974309f904b941298d515ae1b1954215768ec5a678d55c3183f2ffd0adad2
4
+ data.tar.gz: 4a8fa0fd9eae9ee72c51aca902557d44f4e44efb8dcb2dc4b0bcbf1cf924f88b
5
5
  SHA512:
6
- metadata.gz: 5944c0545662af55bcccd50c36f92157871bc5b21e7133b5a7b816be269dc498a9400c67289f72a0d20a6992b546187e65cc926cd44c0c3b17bb3fcb938a408d
7
- data.tar.gz: e6d1f1f06136a7367936a5090ed96e4b2012305e1ddd67f643b3e587c3a832a8d47ee9fcc1d12f6f5d827682a3182d2b8be5d3e675a33b637f884e9bdd73e629
6
+ metadata.gz: a1dcf2b8d173740a378bcb6bf6f02821469255050d6cdcd7aa88862cdd8ca0fdae0d7709817427996910009f92c2a184c3f5428959465554cc8dc072a2865b18
7
+ data.tar.gz: 78d81b30eb4a8ca3c107b4303c193d086889d94ce45e83efd3b71097e8c1a513ed5b3cd11243ddeea7db9553918eaf80d949a283fa963e0c01f5262de897a088
data/README.md CHANGED
@@ -1137,7 +1137,7 @@ permalink: /people/ # trailing slash makes it an `index.html` file ins
1137
1137
  ---
1138
1138
 
1139
1139
  {% if site.show.authors-%}
1140
- {% assign peeps = site.collections | find: "label", 'people'-%}
1140
+ {% assign peeps = site.collections | where: "label", 'people' | first-%}
1141
1141
  {% if peeps.output-%}
1142
1142
  <p>Our wonderful authors love to share tales of wonder and zeal. Sometimes they go overboard and fall into the waters of silliness or cynicism. We hope you do understand, and take that into the highest consideration.</p>
1143
1143
  <hr class="major"/>
@@ -1160,6 +1160,37 @@ If all went well, you should be able to refresh the ugly people index listing an
1160
1160
 
1161
1161
  ### Add Authors to our lone post
1162
1162
 
1163
+ Now let's add an author or two to our lone post, so we can see author bylines and related posts on author pages. Add the follow yaml front matter to your `_posts/20yy-mm-dd-welcome-to-jekyll.md` file:
1164
+
1165
+ ```yaml
1166
+ author: [julia, petunia]
1167
+ ```
1168
+
1169
+ Let's also remove the `layout: post` entry while we're at it, since the layout is set by the site config defaults to `post` already. The edited front matter should look like:
1170
+
1171
+ ```yaml
1172
+ ---
1173
+ title: "Welcome to Jekyll!"
1174
+ author: [julia, petunia]
1175
+ date: 2020-08-01 11:48:57 -0700
1176
+ categories: jekyll update
1177
+ tags: [jekyll, meta, technology, code, site, editorial theme]
1178
+ ---
1179
+ ```
1180
+
1181
+ Now refresh our lone post, and we should now see a byline with julia and petunia listed as authors. Julia should even be conveniently linked to her author page (and only her, because petunia is not yet published). If you navigate to her author page, you'll now see our one post listed under her "Authored Posts" section.
1182
+
1183
+ #### Add Author cards to posts
1184
+
1185
+ Instead of only linking to author pages, we can also show author cards at the bottom of posts, and link those to full author pages. To do so, we need to add a `post_authors` configuration key to `_config.yml` under the `show` key:
1186
+
1187
+ ```yaml
1188
+ show: # series of switches to customize what appears on the site
1189
+ authors: true # single author blogs may want to disable showing the same author everywhere
1190
+ post_authors: true # you may still want to show the author(s) at the bottom of posts
1191
+ ```
1192
+ Now restart our Jekyll server since we changed our site config, and refresh the post page to see the changes. You'll notice two author cars, one each for julia and petunia, at the bottom of the post. Our byline now helpfully links down to those author cards instead of directly to the author pages. The cards link to the full author pages instead. Notice that petunia's card doesn't link, since she's unpublished, and therefore doesn't have an author page yet.
1193
+
1163
1194
  ### Add Projects
1164
1195
 
1165
1196
  TODO
@@ -18,7 +18,7 @@ local:
18
18
  {%-assign list_limit = include.list_limit | default: site.related_posts_limit | default: 6-%}
19
19
 
20
20
  {%-case article_type-%}
21
- {%-when 'posts'-%} {%-assign articles = site.posts | where: 'author', page.handle | default: site.posts-%}
21
+ {%-when 'posts'-%} {%-if page.handle != empty and page.handle != "" and page.handle != nil-%}{%-assign articles = site.posts | where: 'author', page.handle-%}{%-else-%}{%-assign articles = site.posts-%}{%-endif-%}
22
22
  {%-when 'related_posts'-%} {%-assign articles = site.related_posts | where: 'author', page.handle | default: site.related_posts-%}
23
23
  {%-when 'projects'-%} {%-assign articles = site.projects | where: 'author', page.handle | default: site.projects-%}
24
24
  {%-when 'authors'-%} {%-assign articles = site.people | where: 'author', page.handle | default: site.posts-%}
@@ -33,10 +33,14 @@ local:
33
33
  <h2>{{-include.section_title | default: "Articles"-}}</h2>
34
34
  </header>
35
35
  <div class="{{-article_type }} posts">
36
+ {%-if articles != empty-%}
36
37
  {%-for article in articles limit:list_limit-%}
37
38
  {%-unless article.published == false-%}
38
39
  {% include article.html %}
39
40
  {%-endunless-%}
40
41
  {%-endfor-%}
42
+ {%-else-%}
43
+ <article class="post-card">Looks like there are no {{ include.section_title | default: "Articles" }} here yet!</article>
44
+ {%-endif-%}
41
45
  </div>
42
46
  </section>
@@ -16,9 +16,9 @@ local:
16
16
  auth the author's handle, included only on authored pages;
17
17
  `auth` also determines the `authored` boolean value
18
18
  {%-endcomment-%}
19
- {%-assign peeps = site.collections | find: "label", 'people'-%}
20
- {%-assign next_post = site.posts | find_exp: 'item', "item.author contains auth and item.url != page.url" %}
21
- {%-assign authored = !!auth-%}
19
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
20
+ {%-assign next_post = site.posts | where_exp: 'item', "item.author contains auth" | where_exp: 'item', "item.url != page.url" | first %}
21
+ {%-if auth != empty and auth != "" and auth != nil-%}{%-assign authored = true-%}{%-else-%}{%-assign authored = false-%}{%-endif-%}
22
22
  {%-if include.show_next == false %-}{%-assign show_next = false-%}{%-else-%}{%-assign show_next = true-%}{%-endif-%}
23
23
  {%-if include.show_social == false %-}{%-assign show_social = false-%}{%-else-%}{%-assign show_social = true-%}{%-endif-%}
24
24
  <!-- Author - {{ author.handle | default: auth }} -->
@@ -8,7 +8,7 @@
8
8
  <hr class="sigil"/>
9
9
  {%-endif %}
10
10
  {%-for auth in page.author %}
11
- {%-assign author = site.people | find: 'handle', auth-%}
11
+ {%-assign author = site.people | where: 'handle', auth | first-%}
12
12
  {%-if author.published %}
13
13
  {% include author.html %}
14
14
  {%-else-%}
@@ -20,7 +20,7 @@ local:
20
20
  {%-endcomment-%}
21
21
 
22
22
  {%-assign authors = include.author | default: page.author-%}
23
- {%-assign peeps = site.collections | find: "label", 'people'-%}
23
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
24
24
 
25
25
  {%-if site.show.post_authors and page.type=="posts"-%}
26
26
  {%-assign show_authors = true-%}
@@ -35,6 +35,9 @@ local:
35
35
  {%-assign show_authors = false-%}
36
36
  {%-endif-%}
37
37
  {%-assign has_author_cards = false-%}
38
+ {%-elsif site.show.authors-%}
39
+ {%-assign show_authors = true-%}
40
+ {%-assign has_author_cards = false-%}
38
41
  {%-else-%}
39
42
  {%-assign show_authors = false-%}
40
43
  {%-assign has_author_cards = false-%}
@@ -43,7 +46,7 @@ local:
43
46
  {%-if site.show.authors and show_authors-%}
44
47
  <ul class="inline csv authors">
45
48
  {%-for slug in authors-%}
46
- {%-assign author = site.people | find: 'handle', slug-%}
49
+ {%-assign author = site.people | where: 'handle', slug | first-%}
47
50
  {%-assign author_name = author.name | default: slug-%}
48
51
  {%-if author.published and has_author_cards %}
49
52
  <li><a href="#{{-author.handle-}}" class="p-author" title="Read {{ author.handle-}}'s excerpt below">{{-author_name-}}</a></li>
@@ -1,5 +1,5 @@
1
1
  <!-- Post Header -->
2
- {%-assign peeps = site.collections | find: "label", 'people'-%}
2
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
3
3
  {%-assign authors = include.author | default: page.author-%}
4
4
  {%-assign page_title = include.page_title | default: page.title-%}
5
5
  {%-assign subtitle = include.subtitle | default: page.subtitle-%}
@@ -1,5 +1,5 @@
1
- {%-assign peeps = site.collections | find: "label", 'people'-%}
2
- {%-assign placeholder = site.static_files | find: 'name', 'placeholder.png'-%}
1
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
2
+ {%-assign placeholder = site.static_files | where: 'name', 'placeholder.png' | first-%}
3
3
  {% if paginator.posts != nil and site.paginate %}
4
4
  {% assign posts = paginator.posts %}
5
5
  {% elsif page.layout == "page" %}
@@ -35,7 +35,7 @@
35
35
  <p class="byline">
36
36
  {%-if site.show.authors-%}
37
37
  {%-for auth in post.author-%}
38
- {%-assign author = site.people | find: 'handle', auth-%}
38
+ {%-assign author = site.people | where: 'handle', auth | first-%}
39
39
  {%-if author.published and peeps.output-%}
40
40
  <a href="{{-author.url-}}" rel="author" itemprop="author" class="u-author p-author" title="Read {{ author.name | split: ' ' | first-}}'s bio">{{-author.name-}}</a>
41
41
  {%-elsif author.published-%}
@@ -10,11 +10,10 @@
10
10
  {%-when 'pages'-%} {%-assign series_collection = site.pages-%}
11
11
  {%-when 'people'-%} {%-assign series_collection = site.people-%}
12
12
  {%-endcase-%}
13
- {%-assign series = series_collection | where_exp: 'item', "item.series == page.series and item.published == true" | sort: 'date' %}
13
+ {%-assign series = series_collection | where: "series", page.series | where: "published", true | sort: 'date' %}
14
14
  <!-- Series Aside -->
15
15
  <aside class="series">
16
16
  <header>
17
- {% assign series_titles = series | find: title, page.title | map: 'title'-%}
18
17
  <h3>{{ page.series | replace: '-',' ' | capitalize }} <span class="header-aside"> - {% if page.type=='people'-%}group{%-else-%}{{ include.series_type | default: page.type | append: "-@$remove@me" | remove: "s-@$remove@me" }} series</span>{%-endif-%}</h3>
19
18
  </header>
20
19
  <ol class="series">
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  layout: default
3
+ excerpt: ""
3
4
  ---
4
5
  {%-if page.published and site.show.authors %}
5
6
  <section>
@@ -18,13 +18,14 @@ layout: default
18
18
  {%-if site.show.post_authors and page.author %}
19
19
  {% include authors.html %}
20
20
  {%-endif %}
21
- {% if site.disqus.shortname-%}
21
+ {% if page.comments == true and site.disqus.shortname-%}
22
22
  <hr class="major"/>
23
23
  {% include disqus_comments.html %}
24
- {%-endif-%}
25
- {% if page.comments == true-%}
24
+ {%-elsif page.comments == true-%}
26
25
  <hr class="major"/>
27
26
  {% include comments.html %}
27
+ {%-else-%}
28
+ <br>
28
29
  {%-endif %}
29
30
  <a class="u-url" href="{{-page.url | relative_url-}}" hidden></a>
30
31
  </article>
@@ -7,7 +7,7 @@ excerpt: ""
7
7
  ---
8
8
 
9
9
  {% if site.show.authors-%}
10
- {% assign peeps = site.collections | find: "label", 'people'-%}
10
+ {% assign peeps = site.collections | where: "label", 'people' | first-%}
11
11
  {% if peeps.output-%}
12
12
  <p>Our wonderful authors love to share tales of wonder and zeal. Sometimes they go overboard and fall into the waters of silliness or cynicism. We hope you do understand, and take that into the highest consideration.</p>
13
13
  <hr class="major"/>
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ {% include 404.html %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-editorial
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Middle Bear
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-03 00:00:00.000000000 Z
11
+ date: 2020-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -236,6 +236,7 @@ files:
236
236
  - assets/css/github.css
237
237
  - assets/css/main.css
238
238
  - assets/css/user.css
239
+ - assets/images/index.html
239
240
  - assets/images/logo.png
240
241
  - assets/images/pic01-thumb.jpg
241
242
  - assets/images/pic01.jpg