jekyll-theme-editorial 1.0.5 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +271 -3
- data/_config.yml +1 -0
- data/_includes/articles.html +5 -1
- data/_includes/author.html +3 -3
- data/_includes/authors.html +1 -1
- data/_includes/authors_byline.html +13 -7
- data/_includes/banner.html +14 -7
- data/_includes/mini-posts.html +2 -2
- data/_includes/post_header.html +1 -1
- data/_includes/posts.html +3 -3
- data/_includes/project.html +57 -0
- data/_includes/projects.html +6 -72
- data/_includes/responsive_banner.html +18 -5
- data/_layouts/post.html +4 -3
- data/_pages/people.html +1 -1
- data/assets/images/index.html +4 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35a176b8f2ff001b1a27a292dd19b85037aa5a04af8200b9f6d2e3773f3ae0aa
|
4
|
+
data.tar.gz: 072a4dbd98ac269aac446f68c4eecbffffc79e51aef15c184d921069c3742d1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfd768be320f4bd7d986ce7f50f097b0cb06a6f4ffba2f285b31f2fc6ac1e841dfeda6e98956f58c2d1ecec17e26869944aa4d355b4e7aace5c0a0f51a7a6f06
|
7
|
+
data.tar.gz: 07e6be2cf3736bc4eea152defe10c39d6983e20083d125b20b0c0297ec1f4c940fabd93275e75aeb877b9729fdd0141ec9f0b888ad41a5cd5012b6379c2f32cf
|
data/README.md
CHANGED
@@ -1090,7 +1090,7 @@ collections:
|
|
1090
1090
|
```
|
1091
1091
|
|
1092
1092
|
#### People page defaults
|
1093
|
-
We'll also need to add some page defaults to the `_config.yml` file for people pages, under the `defaults` key:
|
1093
|
+
We'll also need to add some page defaults to the `_config.yml` file for people pages, under the `defaults` key that we defined earlier:
|
1094
1094
|
|
1095
1095
|
```yaml
|
1096
1096
|
- scope:
|
@@ -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 |
|
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,9 +1160,277 @@ 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 cards, 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
|
+
Projects are just another type of collection that are neither date-based posts nor people. You can use them for any kind of collection you'd like, visually renaming the collection to something more suitable to your purposes, even if the theme calls the collection "projects" internally. We'll largely go through the same steps as adding people.
|
1197
|
+
|
1198
|
+
#### Set up the Projects collection
|
1199
|
+
As with the people collection, configure Jekyll in the `_config.yml` file to output our projects collection:
|
1200
|
+
|
1201
|
+
```yaml
|
1202
|
+
###################
|
1203
|
+
# Collections
|
1204
|
+
###################
|
1205
|
+
collections:
|
1206
|
+
people:
|
1207
|
+
output: true
|
1208
|
+
pages:
|
1209
|
+
output: true
|
1210
|
+
projects: # find/put projects in `\_projects`
|
1211
|
+
output: true
|
1212
|
+
```
|
1213
|
+
Now we have three entries—one each for people, pages, and projects—under the `collections` key in our `_config.yml` file.
|
1214
|
+
|
1215
|
+
#### Project page defaults
|
1216
|
+
Let's add in the relevant page defaults to the `_config.yml` file under the `defaults` key we defined earlier:
|
1217
|
+
|
1218
|
+
```yaml
|
1219
|
+
- scope:
|
1220
|
+
path: ""
|
1221
|
+
type: "projects"
|
1222
|
+
values:
|
1223
|
+
layout: "project"
|
1224
|
+
menus: 'projects' # used by jekyll-menus plugin
|
1225
|
+
type: "projects"
|
1226
|
+
image_path: "/assets/images/"
|
1227
|
+
comments: false
|
1228
|
+
published: false
|
1229
|
+
```
|
1230
|
+
|
1231
|
+
#### Create some projects
|
1232
|
+
As before, nothing will have changed at this point until we add some projects. We'll again just copy them from the Editorial theme gem rather than create them from scratch. If necessary, use `bundle info` again to find the theme gem from which to copy the `_projects` folder with its 4 project files inside into your site folder:
|
1233
|
+
|
1234
|
+
```sh
|
1235
|
+
:~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
|
1236
|
+
```
|
1237
|
+
Then, after you save the `_config.yml` file, restart, and refresh the browser, you should see three new menu items under "Projects" in the menu sidebar for the added project pages (as with authors, the 4th is unpublished). By the way, now that we have some projects, we're showing their mini-post cards in the sidebar as well!
|
1238
|
+
|
1239
|
+
|
1240
|
+
### Add the Projects index page
|
1241
|
+
|
1242
|
+
Similar to what we did with authors, we'll use the theme's `projects.html` include to list out standard project blocks for the projects index page. We set the page's `permalink` in the front matter to `/projects/` so that it overrides the ugly default HTML index page. If there are no published projects, we'll just show a little message stating as much. Save this file as `_pages/projects.html` (not to be confused with `_includes/projects.html` which is provided by the Editorial theme gem).
|
1243
|
+
|
1244
|
+
```liquid
|
1245
|
+
---
|
1246
|
+
title: Projects
|
1247
|
+
date: 2020-03-01 01:23:45 -0800
|
1248
|
+
permalink: /projects/
|
1249
|
+
---
|
1250
|
+
|
1251
|
+
<p>These projects are the bomb. Well, not really a bomb, but <em>da bomb</em>, y'know, like awesome but more explosive or something. Anyway check em out and make happy noises <em>en masse</em>.</p>
|
1252
|
+
|
1253
|
+
{% include projects.html %}
|
1254
|
+
```
|
1255
|
+
Now you can click on "Projects" in the sidebar menu and hopefully see a nicely formatted list of the 3 published projects. You can toggle the `published` status of the fourth project to see that one as well.
|
1256
|
+
|
1257
|
+
#### Toggle summaries and dates for project pages
|
1258
|
+
|
1259
|
+
Our sample project pages have extended summaries which we'd like to show. At the same time, our projects index page is displaying a page creation date that looks odd in the upper right corner of page content area. We can fix both via two site configuration settings in `_config.yml`:
|
1260
|
+
|
1261
|
+
```yaml
|
1262
|
+
include_summary: [projects] # collections for which to show the summary in the header
|
1263
|
+
exclude_dates: [people, pages] # collections for which to not show dates in the header
|
1264
|
+
```
|
1265
|
+
Add these two lines to `_config.yml` and restart Jekyll to see the date disappear on the projects index page (which is part of the `pages` collection, not the `projects` colllection) and summaries on each of the individual published project pages (which *are* part of the `projects` collection). While we're at it, we removed publication dates from people pages too.
|
1266
|
+
|
1267
|
+
#### Add Author cards to projects
|
1268
|
+
|
1269
|
+
Like posts, we can show author cards at the bottom of projects, and link those to the full author pages. To do so, we'll add a `project_authors` configuration key to `_config.yml` under the `show` key:
|
1270
|
+
|
1271
|
+
```yaml
|
1272
|
+
show: # series of switches to customize what appears on the site
|
1273
|
+
authors: true # single author blogs may want to disable showing the same author everywhere
|
1274
|
+
post_authors: true # you may still want to show the author(s) at the bottom of posts
|
1275
|
+
page_authors: true # you may still want to show the author(s) for pages
|
1276
|
+
project_authors: true # you may still want to show the author(s) for projects
|
1277
|
+
```
|
1278
|
+
While here, we also added the `page_authors` key. Note that no pages so far have authors defined in their front matter, so you shouldn't see authors on any pages in the pages collection. This is only for pages you explicily want authors to show, by including them in the front matter. Restart the Jekyll server and refresh any published project page to see author cards at the bottom.
|
1279
|
+
|
1280
|
+
### Post decorations
|
1281
|
+
|
1282
|
+
Posts can be decorated with more than the titles, authors, body content, tags, and categories we've seen so far. The Editorial theme supports an array of images, metadata, and supplementary fields to make your posts. Let's pull up the relevant `_sample` file, `post-template.md` to get an overview:
|
1283
|
+
|
1284
|
+
```yaml
|
1285
|
+
---
|
1286
|
+
# defaults assumed for these jekyll variables: layout, permalink, published, excerpt
|
1287
|
+
# name the file similar to title (slugified - replace spaces with underscores & remove punctuation)
|
1288
|
+
title: "" # used in the page/post header, HTML title, menus & SEO
|
1289
|
+
subtitle: "" # optional; shown under the page/post header
|
1290
|
+
author: [] # use the handle of the author, not their name
|
1291
|
+
date: 2020-01-01 00:00:00 -0800 # publication date; overrides the file save date
|
1292
|
+
last_modified_at: # optional; date to show in addition to/in place of create date
|
1293
|
+
categories: [] # choose one best category, ideally
|
1294
|
+
tags: [] # choose 3-7 tags, ideally
|
1295
|
+
series: "Build a blog" # optional; use `series` to group posts and show a sidebar of posts in the series (limited to 1 for now)
|
1296
|
+
location: "New York, NY" # optional; location where the post was made
|
1297
|
+
website: https://example.com/ # optional; external, related website, possibly featured
|
1298
|
+
image: "" # default image for SEO & jekyll-feed
|
1299
|
+
images: # all images are optional; banner and either default or thumbnail are recommended
|
1300
|
+
default: # general-use size, default for lists if no thumbnail
|
1301
|
+
file: "" # no path, just the filename (e.g., "my great image.png")
|
1302
|
+
# default images generally use the default image texts, but can be specified here
|
1303
|
+
banner: # largest, full-page width landscape at top of page
|
1304
|
+
file: "" # no path, just the filename (e.g., "my great image.png")
|
1305
|
+
alt_text: "" # describe the image for screen readers
|
1306
|
+
caption: "" # optional explanatory text, can be used for attributions
|
1307
|
+
title: "" # optional; usually shown as a tooltip on hover
|
1308
|
+
thumbnail: # smaller image for lists/grids (like index pages)
|
1309
|
+
file: "" # no path, just the filename (e.g., "my great image.png")
|
1310
|
+
# thumbnails generally use the default image texts, but can be specified here
|
1311
|
+
# these texts are defaults for all images in the images array, if not individually specified:
|
1312
|
+
alt_text: "" # describe the image for screen readers
|
1313
|
+
caption: "" # optional explanatory text, can be used for attributions
|
1314
|
+
title: "" # optional; usually shown as a tooltip on hover
|
1315
|
+
canonical_url: "" # optional; customize the canonical URL for this page
|
1316
|
+
lang: "" # optional; language for the page, `en_US` by default
|
1317
|
+
description: "" # optional; short description of the page's content used for SEO
|
1318
|
+
# NOTE that the first paaragraph below is the excerpt, if no excerpt is defined here in the front matter.
|
1319
|
+
---
|
1320
|
+
```
|
1321
|
+
|
1322
|
+
#### Adding textual elements
|
1323
|
+
We'll first start by adding some textual elements, like subtitle and location. Add the following to our blog post's front matter:
|
1324
|
+
|
1325
|
+
```yaml
|
1326
|
+
subtitle: "How Jekyll Makes It All So Easy!"
|
1327
|
+
location: "San Francisco, CA"
|
1328
|
+
website: https://jekyllrb.com/docs/home
|
1329
|
+
description: Let's make sure Google and company know enough about this page that it will pop up higher in search results
|
1330
|
+
```
|
1331
|
+
Refresh our blog post page, and you should see the page title is now linked (visually indicated with a superscripted link icon), a subtitle under it, and the location listed in the byline. The description field is purely for <abbr title="Search Engine Optimization">SEO</abbr> purposes, and can only be seen by viewing the source of the page (in the HTML HEAD section).
|
1332
|
+
|
1333
|
+
#### Adding a post to a series
|
1334
|
+
|
1335
|
+
Sometimes you want to group a few posts together as a series of posts in a way that's unsuitable for tags or categories. You can do this grouping with series. It's a single title for the series, like "Build a blog", that must be the exact same for each post you want grouped together. In fact, let's add this exact series to our lone blog post. Add the following line to the blog post's front matter:
|
1336
|
+
|
1337
|
+
```yaml
|
1338
|
+
series: "build-a-blog"
|
1339
|
+
```
|
1340
|
+
Now refresh the blog post page in your browser and you should see a new series sidebar appear on the right. Note that you don't have to "slugify" the series name. This sames series name just happens to be that way.
|
1341
|
+
|
1342
|
+
### Adding a post image
|
1343
|
+
|
1344
|
+
The Editorial theme, like many blog themes, features a prominent banner image for most pages, including blog posts. To define this images, we have a few different methods. We'll go through them from simplest to most flexible.
|
1345
|
+
|
1346
|
+
#### The Simplest, but least flexible, way to add an image
|
1347
|
+
|
1348
|
+
Because many Jekyll themes will simply use an `image` key in the post front matter, the Editorial theme includes this option as a backwards compatibility measure. We'll use the [Jekyll logo](https://jekyllrb.com/img/logo-2x.png) as a convenient sample image. Be sure to save this image file to your site's `/assets/images/` folder (creating these folders along the way, if necessary), which is the theme-wide default location for image assets. Then add the following to our blog post's front matter:
|
1349
|
+
|
1350
|
+
```yaml
|
1351
|
+
image: "logo-2x.png"
|
1352
|
+
```
|
1353
|
+
Save the changes and then refresh our blog post page to see a nice, and possibly blurry (due to its lower resolution), Jekyll logo pop up as a banner image on the post.
|
1354
|
+
|
1355
|
+
#### Adding alt text, title, and caption
|
1356
|
+
|
1357
|
+
Because HTML images have some textual metadata often attached to them, the Editorial theme introduces these extra fields for the common image metadata in the post's front matter:
|
1358
|
+
|
1359
|
+
```yaml
|
1360
|
+
alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
|
1361
|
+
image_title: "The Jekyll logo is so cool!"
|
1362
|
+
caption: "Jekyll lets you create static websites quickly and easily!"
|
1363
|
+
```
|
1364
|
+
Add these lines, save, and refresh the page, and you should see a caption added to the bottom of the logo.
|
1365
|
+
|
1366
|
+
#### A more flexible middle option for images
|
1367
|
+
|
1368
|
+
One problem you might recognize right away is that this method only ever allows one image per post. What if you what 2 different sizes, like a thumbnail and a high resolution version? Our Editorial theme handles this with a slightly more complex yaml structure (replace the *four* previous lines with this):
|
1369
|
+
|
1370
|
+
```yaml
|
1371
|
+
images:
|
1372
|
+
default:
|
1373
|
+
file: "logo-2x.png"
|
1374
|
+
alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
|
1375
|
+
title: "The Jekyll logo is so cool!"
|
1376
|
+
caption: "Jekyll lets you create static websites quickly and easily!"
|
1377
|
+
```
|
1378
|
+
or alternatively,
|
1379
|
+
|
1380
|
+
```yaml
|
1381
|
+
images:
|
1382
|
+
default: "logo-2x.png"
|
1383
|
+
alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
|
1384
|
+
title: "The Jekyll logo is so cool!"
|
1385
|
+
caption: "Jekyll lets you create static websites quickly and easily!"
|
1386
|
+
```
|
1387
|
+
|
1388
|
+
You can even mix and match the prior two styles, for backwards compatibility:
|
1389
|
+
|
1390
|
+
```yaml
|
1391
|
+
image: "logo-2x.png"
|
1392
|
+
images:
|
1393
|
+
alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
|
1394
|
+
title: "The Jekyll logo is so cool!"
|
1395
|
+
caption: "Jekyll lets you create static websites quickly and easily!"
|
1396
|
+
```
|
1397
|
+
|
1398
|
+
#### The most flexible option for images
|
1399
|
+
|
1400
|
+
The prior structure sets us up to be able to add a few different versions of the image (`default`, `banner`, and `thumbnail`):
|
1401
|
+
|
1402
|
+
```yaml
|
1403
|
+
images:
|
1404
|
+
default:
|
1405
|
+
file: "pic02.jpg"
|
1406
|
+
banner:
|
1407
|
+
file: "logo-2x.png"
|
1408
|
+
thumbnail:
|
1409
|
+
file: "pic06.jpg"
|
1410
|
+
alt_text: "A thumbnail version of the Jekyll logo, featuring stylized script and a red-liquid-filled test tube"
|
1411
|
+
title: "Read more about how to use Jekyll!"
|
1412
|
+
alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
|
1413
|
+
title: "The Jekyll logo is so cool!"
|
1414
|
+
caption: "Jekyll lets you create static websites quickly and easily!"
|
1415
|
+
```
|
1416
|
+
|
1417
|
+
You'll notice that you can customize the metadata for each image along with the image file itself. Now if you save and then navigate to the posts index page (clicking "All Posts" in the post nav area or "Recent Posts" in the sidebar menu), you should notice the thumbnail image is different and has different hover text from that on the post page.
|
1418
|
+
|
1419
|
+
#### Missing image
|
1420
|
+
|
1421
|
+
Note that if you happen to misspell the name of your image in the front matter config, you'll get a helpful "Missing image" message with the file name and image title in a box instead of the image that Jekyll couldn't find during build.
|
1422
|
+
|
1423
|
+
### Multiple posts and post navigation
|
1424
|
+
|
1425
|
+
To see post navigation in action, we'll need more than one post to navigate to. Rather than making up a bunch of posts, we'll simply copy sample posts from the theme gem, as we've done for other demo content. Remember to `bundle info` to find the theme gem folder:
|
1426
|
+
|
1427
|
+
```sh
|
1428
|
+
:~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
|
1429
|
+
```
|
1430
|
+
And then copy the posts in the `_posts` directory from the theme gem to your site directory's `_posts` folder. Refresh the browser and see these new posts show up in the sidebar menu. You should also see a "previous" post navigation link (likely to the "Look at my great tatoos everybody!" post) at the top and bottom of the post content. You'll also notice that our "Welcome to Jekyll!" post now has some sibling posts in the "Build A Blog" series of posts. Finally, a set of "Latest Posts" (or "Related Posts" if you have Jekyll's `site.related_posts` LSI functionality enabled, which is not supported by the Github Pages build process) will show up below the post author(s).
|
1431
|
+
|
1432
|
+
Clicking around the "Archives", "Categories", and "Tags" pages, not to mention author pages and the home page, will now show more post-related content as well.
|
1433
|
+
|
1166
1434
|
|
1167
1435
|
## Setup Notes
|
1168
1436
|
|
data/_config.yml
CHANGED
@@ -24,6 +24,7 @@ timezone: America/Los_Angeles # set this to a standardized TZ na
|
|
24
24
|
date_format: # optional; set the way dates are formatted throughout the site - see https://ruby-doc.org/core/Time.html#method-i-strftime
|
25
25
|
|
26
26
|
|
27
|
+
|
27
28
|
###################
|
28
29
|
# Build settings
|
29
30
|
###################
|
data/_includes/articles.html
CHANGED
@@ -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
|
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>
|
data/_includes/author.html
CHANGED
@@ -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 |
|
20
|
-
{%-assign next_post = site.posts |
|
21
|
-
{%-assign authored
|
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 }} -->
|
data/_includes/authors.html
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
<hr class="sigil"/>
|
9
9
|
{%-endif %}
|
10
10
|
{%-for auth in page.author %}
|
11
|
-
{%-assign author = site.people |
|
11
|
+
{%-assign author = site.people | where: 'handle', auth | first-%}
|
12
12
|
{%-if author.published %}
|
13
13
|
{% include author.html %}
|
14
14
|
{%-else-%}
|
@@ -20,9 +20,12 @@ local:
|
|
20
20
|
{%-endcomment-%}
|
21
21
|
|
22
22
|
{%-assign authors = include.author | default: page.author-%}
|
23
|
-
{%-assign peeps = site.collections |
|
23
|
+
{%-assign peeps = site.collections | where: "label", 'people' | first-%}
|
24
24
|
|
25
|
-
{%-if site.show.
|
25
|
+
{%-if site.show.authors and include.page_type=="index"-%}
|
26
|
+
{%-assign show_authors = true-%}
|
27
|
+
{%-assign has_author_cards = false-%}
|
28
|
+
{%-elsif site.show.post_authors and page.type=="posts"-%}
|
26
29
|
{%-assign show_authors = true-%}
|
27
30
|
{%-assign has_author_cards = true-%}
|
28
31
|
{%-elsif site.show.project_authors and page.type=="projects"-%}
|
@@ -35,6 +38,9 @@ local:
|
|
35
38
|
{%-assign show_authors = false-%}
|
36
39
|
{%-endif-%}
|
37
40
|
{%-assign has_author_cards = false-%}
|
41
|
+
{%-elsif site.show.authors-%}
|
42
|
+
{%-assign show_authors = true-%}
|
43
|
+
{%-assign has_author_cards = false-%}
|
38
44
|
{%-else-%}
|
39
45
|
{%-assign show_authors = false-%}
|
40
46
|
{%-assign has_author_cards = false-%}
|
@@ -43,16 +49,16 @@ local:
|
|
43
49
|
{%-if site.show.authors and show_authors-%}
|
44
50
|
<ul class="inline csv authors">
|
45
51
|
{%-for slug in authors-%}
|
46
|
-
{%-assign author = site.people |
|
52
|
+
{%-assign author = site.people | where: 'handle', slug | first-%}
|
47
53
|
{%-assign author_name = author.name | default: slug-%}
|
48
54
|
{%-if author.published and has_author_cards %}
|
49
|
-
<li><a href="#{{-author.handle-}}" class="p-author" title="Read {{ author.handle-}}'s excerpt below">{{-author_name-}}</a></li>
|
55
|
+
<li><a href="#{{-author.handle-}}" class="p-author" itemprop="author" title="Read {{ author.handle-}}'s excerpt below">{{-author_name-}}</a></li>
|
50
56
|
{%-elsif author.published and peeps.output-%}
|
51
|
-
<li><a href="{{-author.url-}}" rel="author" class="p-author u-author" title="Read {{
|
57
|
+
<li><a href="{{-author.url-}}" rel="author" class="p-author u-author" itemprop="author" title="Read {{ author_name | split: ' ' | first-}}'s bio">{{-author_name-}}</a></li>
|
52
58
|
{%-elsif author.published-%}
|
53
|
-
<li class="p-author">{{-author_name-}}</li>
|
59
|
+
<li class="p-author" itemprop="author">{{-author_name-}}</li>
|
54
60
|
{%-elsif has_author_cards %}
|
55
|
-
<li><a href="#{{-slug-}}" class="p-author" title="Read {{ slug-}}'s excerpt below">{{-slug-}}</a></li>
|
61
|
+
<li><a href="#{{-slug-}}" class="p-author" itemprop="author" title="Read {{ slug-}}'s excerpt below">{{-slug-}}</a></li>
|
56
62
|
{%-else-%}
|
57
63
|
<li class="p-author">{{-slug-}}</li>
|
58
64
|
{%-endif-%}
|
data/_includes/banner.html
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
{%-assign static_file_names = site.static_files
|
2
|
-
|
1
|
+
{%-assign static_file_names = site.static_files | map: 'name'-%}
|
2
|
+
{%-assign banner_image = page.images.banner.file | default: page.images.banner | default: page.images.default.file | default: page.images.default | default: page.image-%}
|
3
|
+
{%-assign banner_alt_text = page.images.banner.alt_text | default: page.images.default.alt_text | default: page.images.alt_text | default: page.alt_text-%}
|
4
|
+
{%-assign banner_title = page.images.banner.title | default: page.images.default.title | default: page.images.title | default: page.image_title-%}
|
5
|
+
{%-assign banner_caption = page.images.banner.caption | default: page.images.default.caption | default: page.images.caption | default: page.caption-%}
|
6
|
+
|
7
|
+
{%-if static_file_names contains banner_image %}
|
3
8
|
<!-- Banner Image -->
|
4
9
|
<figure class="image main">
|
5
|
-
<img src="{{-page.image_path-}}{{-
|
6
|
-
|
7
|
-
<figcaption>{{-
|
8
|
-
|
10
|
+
<img src="{{-page.image_path-}}{{-banner_image-}}" title="{{-banner_title-}}" alt="{{-banner_alt_text-}}"/>
|
11
|
+
{%-if banner_caption %}
|
12
|
+
<figcaption>{{-banner_caption | markdownify-}}</figcaption>
|
13
|
+
{%-endif %}
|
9
14
|
</figure>
|
10
|
-
|
15
|
+
{%-else %}
|
16
|
+
<figure class="box"><h3>Missing image</h3>{{-banner_image-}}<br>{{-banner_title-}}</figure>
|
17
|
+
{%-endif %}
|
data/_includes/mini-posts.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
{%-assign published_projects = site.projects | where: 'published', true
|
2
|
-
{%-assign project_menu = site.data.menus.sidebar | find: 'identifier', 'projects'
|
1
|
+
{%-assign published_projects = site.projects | where: 'published', true-%}
|
2
|
+
{%-assign project_menu = site.data.menus.sidebar | find: 'identifier', 'projects'-%}
|
3
3
|
{%-if published_projects != empty %}
|
4
4
|
<!-- Section - Mini-posts -->
|
5
5
|
<section>
|
data/_includes/post_header.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<!-- Post Header -->
|
2
|
-
{%-assign peeps = site.collections |
|
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-%}
|
data/_includes/posts.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
{%-assign peeps = site.collections |
|
2
|
-
{%-assign placeholder = site.static_files |
|
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 |
|
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-%}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
{%-comment-%}
|
2
|
+
lists a project as a section card given a project hash
|
3
|
+
|
4
|
+
inputs:
|
5
|
+
project the project to render
|
6
|
+
dependencies:
|
7
|
+
site.show.authors used to determine whether to show authors
|
8
|
+
site.show.project_authors used to determine whether to show authors
|
9
|
+
site.title used to determine whether to show separator
|
10
|
+
local:
|
11
|
+
modified_date the proejct's modification date, if any, that differs from project.date
|
12
|
+
{%-endcomment-%}
|
13
|
+
|
14
|
+
{%-if project.published %}
|
15
|
+
<article itemid="{{-project.url|absolute_url-}}" class="h-entry project-card row gtr-50 gtr-uniform" itemscope itemtype="http://schema.org/Article">
|
16
|
+
{% if project.images-%}
|
17
|
+
<div class="col-4 col-12-small">
|
18
|
+
<figure>
|
19
|
+
<a href="{{-project.url-}}" class="image fit" title="Learn more about '{{-project.title-}}'">
|
20
|
+
{% include item_image.html-%}
|
21
|
+
</a>
|
22
|
+
</figure>
|
23
|
+
<div class="snug smaller categories">{%-include categories.html %}</div>
|
24
|
+
{%-if project.series %}
|
25
|
+
<div class="snug series" title="This project is part of a series">{{ project.series | replace: '-',' ' | split: " " | join: "-----" | camelcase | split: "-----" | join: " "-}}</div>
|
26
|
+
{%-endif %}
|
27
|
+
</div>
|
28
|
+
{%-endif %}
|
29
|
+
<div class="col-8 col-12-small">
|
30
|
+
{%-assign modified_date = project.modified_date | default: project.last_modified_at-%}
|
31
|
+
{%-if modified_date-%}
|
32
|
+
{% include date_modified.html item_date=modified_date lead_in='last modified: '-%}
|
33
|
+
{%-endif %}
|
34
|
+
<header class="tight">
|
35
|
+
<span class="header-aside">{% include item_date.html %}</span>
|
36
|
+
<h3><a href="{{-project.url-}}" itemprop="name" class="u-url p-name" title="Learn more about '{{-project.title-}}'">{{-project.title-}}</a></h3>
|
37
|
+
<p class="subtitle p-subtitle" itemprop="alternativeHeadline">{{-project.subtitle-}}</p>
|
38
|
+
{%-if site.show.project_authors and site.show.authors and project.author or project.location-%}
|
39
|
+
<div class="byline">
|
40
|
+
{% include authors_byline.html page_type="index" author=project.author-%}
|
41
|
+
{%-if project.location-%}
|
42
|
+
{% if project.author or site.title-%}{{-" | "-}}{%-endif %}
|
43
|
+
<span class="p-location" itemprop="location" title="Post location">{{-project.location-}}</span>
|
44
|
+
{%-endif %}
|
45
|
+
</div>
|
46
|
+
{%-endif-%}
|
47
|
+
</header>
|
48
|
+
{% if include.summary or project.summary or project.excerpt-%}
|
49
|
+
<div class="summary p-summary" itemprop="abstract">
|
50
|
+
{{-include.summary | default: project.summary | default: project.excerpt | markdownify-}}
|
51
|
+
</div>
|
52
|
+
{%-endif %}
|
53
|
+
{%-include tags.html %}
|
54
|
+
</div>
|
55
|
+
</article>
|
56
|
+
<hr class="major"/>
|
57
|
+
{% endif %}
|
data/_includes/projects.html
CHANGED
@@ -1,88 +1,22 @@
|
|
1
1
|
{%-comment-%}
|
2
2
|
lists projects as section cards given a projects hash
|
3
3
|
|
4
|
-
inputs:
|
5
|
-
dependencies:
|
4
|
+
inputs:
|
6
5
|
projects the projects to render
|
6
|
+
dependencies:
|
7
7
|
site.projects used as the default if `projects` isn't available already
|
8
|
-
|
9
|
-
site.show.authors used to determine whether to show authors
|
10
|
-
site.show.project_authors used to determine whether to show authors
|
11
|
-
site.people lookup authors in the people array
|
12
|
-
site.title use as the author, as a last resort
|
8
|
+
page.layout used to see if projects should be set to site.projects
|
13
9
|
local:
|
14
10
|
projects default to site.projects if not already provided
|
15
11
|
published_projects projects filtered for `published==true`
|
16
|
-
placeholder placeholder.png file to use in case no other page image is available
|
17
|
-
auth the author's handle, used for unpublished authors in place of their name
|
18
|
-
author the looked-up author in site.people
|
19
12
|
{%-endcomment-%}
|
20
13
|
|
21
|
-
{%-if page.layout == "page"-%}
|
22
|
-
|
23
|
-
{%-endif-%}
|
24
|
-
{%-assign published_projects = projects | where: 'published', true-%}
|
14
|
+
{%-if page.layout == "page"-%}{%-assign projects = site.projects-%}{%-endif-%}
|
15
|
+
{%-assign published_projects = projects | where: 'published', true-%}
|
25
16
|
|
26
17
|
{%-if published_projects != empty %}
|
27
18
|
{%-for project in published_projects %}
|
28
|
-
{
|
29
|
-
<article itemid="{{-project.url|absolute_url-}}" class="h-entry project-card row gtr-50 gtr-uniform" itemscope itemtype="http://schema.org/Article">
|
30
|
-
{% if project.images-%}
|
31
|
-
<div class="col-4 col-12-small">
|
32
|
-
<figure>
|
33
|
-
<a href="{{-project.url-}}" class="image fit" title="Learn more about '{{-project.title-}}'">
|
34
|
-
{% include item_image.html-%}
|
35
|
-
</a>
|
36
|
-
</figure>
|
37
|
-
<div class="snug smaller categories">{%-include categories.html %}</div>
|
38
|
-
{%-if project.series %}
|
39
|
-
<div class="snug series" title="This project is part of a series">{{ project.series | replace: '-',' ' | split: " " | join: "-----" | camelcase | split: "-----" | join: " "-}}</div>
|
40
|
-
{%-endif %}
|
41
|
-
</div>
|
42
|
-
{%-endif %}
|
43
|
-
<div class="col-8 col-12-small">
|
44
|
-
{%-assign modified_date = project.modified_date | default: project.last_modified_at-%}
|
45
|
-
{%-if modified_date-%}
|
46
|
-
{% include date_modified.html item_date=modified_date lead_in='last modified: '-%}
|
47
|
-
{%-endif %}
|
48
|
-
<header class="tight">
|
49
|
-
<span class="header-aside">{% include item_date.html %}</span>
|
50
|
-
<h3><a href="{{-project.url-}}" itemprop="name" class="u-url p-name" title="Learn more about '{{-project.title-}}'">{{-project.title-}}</a></h3>
|
51
|
-
<p class="subtitle p-subtitle" itemprop="alternativeHeadline">{{-project.subtitle-}}</p>
|
52
|
-
{%-if site.show.project_authors and site.show.authors and project.author or project.location-%}
|
53
|
-
<p class="byline">
|
54
|
-
{%-if site.show.authors %}
|
55
|
-
{%-for auth in project.author-%}
|
56
|
-
{%-assign author = site.people | find: 'handle', auth-%}
|
57
|
-
{%-if author.published and author.url-%}
|
58
|
-
<a href="{{-author.url-}}" rel="author" itemprop="author" class="u-author p-author" title="Read {{ author.name | split: ' ' | first-}}'s bio">{{-author.name-}}</a>
|
59
|
-
{%-elsif author.published-%}
|
60
|
-
<span itemprop="author" class="p-author">{{-author.name-}}</span>
|
61
|
-
{%-else-%}
|
62
|
-
<span itemprop="author" class="p-author">{{-auth-}}</span>
|
63
|
-
{%-endif-%}
|
64
|
-
{%-unless forloop.last %}, {% endunless-%}
|
65
|
-
{%-else-%}
|
66
|
-
<span itemprop="author" class="p-author">{{-site.title-}}</span>
|
67
|
-
{%-endfor-%}
|
68
|
-
{%-if project.location and project.author or site.title-%}{{-" | "-}}{%-endif-%}
|
69
|
-
{%-endif %}
|
70
|
-
{%-if project.location %}
|
71
|
-
<span class="p-location" itemprop="location" title="Post location">{{-project.location-}}</span>
|
72
|
-
{%-endif %}
|
73
|
-
</p>
|
74
|
-
{%-endif-%}
|
75
|
-
</header>
|
76
|
-
{% if include.summary or project.summary or project.excerpt-%}
|
77
|
-
<div class="summary p-summary" itemprop="abstract">
|
78
|
-
{{-include.summary | default: project.summary | default: project.excerpt | markdownify-}}
|
79
|
-
</div>
|
80
|
-
{%-endif %}
|
81
|
-
{%-include tags.html %}
|
82
|
-
</div>
|
83
|
-
</article>
|
84
|
-
<hr class="major"/>
|
85
|
-
{% endif %}
|
19
|
+
{% include project.html %}
|
86
20
|
{% endfor %}
|
87
21
|
{% else %}
|
88
22
|
<h2>Oof!</h2>
|
@@ -3,18 +3,31 @@ uses parent page settings or a special parent page.banner hash for more flexibil
|
|
3
3
|
(parent) page: [title, subtitle, description, etc.]
|
4
4
|
banner: [header, subheader, content, etc.]
|
5
5
|
{%-endcomment-%}
|
6
|
+
|
7
|
+
{%-assign static_file_names = site.static_files | map: 'name'-%}
|
8
|
+
{%-assign banner_header = page.banner.header | default: page.title | default: site.title-%}
|
9
|
+
{%-assign banner_subheader= page.banner.subheader | default: page.subtitle | default: site.tagline-%}
|
10
|
+
{%-assign banner_content = page.banner.content | default: page.description | default: site.description-%}
|
11
|
+
{%-assign banner_image = page.banner.image | default: page.images.banner.file | default: page.images.banner | default: page.images.default.file | default: page.images.default | default: page.image-%}
|
12
|
+
{%-assign banner_alt_text = page.banner.alt_text | default: page.images.banner.alt_text | default: page.images.default.alt_text | default: page.images.alt_text | default: page.alt_text-%}
|
13
|
+
{%-assign banner_title = page.banner.image_title | default: page.images.banner.title | default: page.images.default.title | default: page.images.title | default: page.image_title-%}
|
14
|
+
|
6
15
|
<section id="banner">
|
7
16
|
<div class="content">
|
8
17
|
<header>
|
9
|
-
<h1>{{-
|
10
|
-
<p>{{-
|
18
|
+
<h1>{{-banner_header-}}</h1>
|
19
|
+
<p>{{-banner_subheader-}}</p>
|
11
20
|
</header>
|
12
|
-
<p>{{-
|
21
|
+
<p>{{-banner_content-}}</p>
|
13
22
|
<ul class="actions">
|
14
23
|
<li><a href="{{-page.banner.url | default: site.url-}}" title="{{-page.banner.link_title-}}" class="button big">{{-page.banner.button_text-}}</a></li>
|
15
24
|
</ul>
|
16
25
|
</div>
|
26
|
+
{%-if static_file_names contains banner_image %}
|
17
27
|
<figure class="image object">
|
18
|
-
<img src="{{-site.image_path-}}{{-
|
28
|
+
<img src="{{-site.image_path-}}{{-banner_image-}}" alt="{{-banner_alt_text-}}" title="{{-banner_title-}}"/>
|
19
29
|
</figure>
|
20
|
-
|
30
|
+
{%-else %}
|
31
|
+
<figure class="box"><h3>Missing image</h3>{{-banner_image-}}<br>{{-banner_title-}}</figure>
|
32
|
+
{%-endif %}
|
33
|
+
</section>
|
data/_layouts/post.html
CHANGED
@@ -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
|
-
{%-
|
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>
|
data/_pages/people.html
CHANGED
@@ -7,7 +7,7 @@ excerpt: ""
|
|
7
7
|
---
|
8
8
|
|
9
9
|
{% if site.show.authors-%}
|
10
|
-
{% assign peeps = site.collections |
|
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"/>
|
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.
|
4
|
+
version: 1.0.10
|
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-
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- _includes/post_header.html
|
144
144
|
- _includes/post_nav.html
|
145
145
|
- _includes/posts.html
|
146
|
+
- _includes/project.html
|
146
147
|
- _includes/projects.html
|
147
148
|
- _includes/responsive_banner.html
|
148
149
|
- _includes/scripts.html
|
@@ -236,6 +237,7 @@ files:
|
|
236
237
|
- assets/css/github.css
|
237
238
|
- assets/css/main.css
|
238
239
|
- assets/css/user.css
|
240
|
+
- assets/images/index.html
|
239
241
|
- assets/images/logo.png
|
240
242
|
- assets/images/pic01-thumb.jpg
|
241
243
|
- assets/images/pic01.jpg
|