jekyll-theme-editorial 1.0.6 → 1.0.11

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: 713298d11a3dd1673806658ae9ff4a70d1cbc83cfc06eb6cdf4dab8a9dc1b7f5
4
- data.tar.gz: 2754deecdbd94222cab3cd46e20dca24cd7131402bff98a40ff04eccbcd06d1c
3
+ metadata.gz: 723032f0b04256a4ae75e2a54d43243e034b03fd8f5dd0c0eb658627d23a64cc
4
+ data.tar.gz: c6c57efc31b84092e942225095f8ec37468ceb4975a9a37490292005ee7e4b07
5
5
  SHA512:
6
- metadata.gz: 15959920203a1ee93244e6180ed4f49dd84b536450b0073a55329dfcb53c34f398ab282ff4139debd9918f69e2272edb5404a502070157f5dbdc85f40fb41129
7
- data.tar.gz: 5fc0545414c6335f2d571ce618c91ab66895c1859a4c7a80c1d11f6718989445b67712f31a91a5fb11097669bd91142a0ffef4f1b4d7c14aaa9381734bb57e42
6
+ metadata.gz: d43c437efa287ea3c593d290952eba986c3133454bd1891c094042e565fac3801bd4ae1c492393b41673f1870620ba961ae424d5769df07c1be126f1ace9559e
7
+ data.tar.gz: caae30eff44c04d927640a4c230d485d9d2fbd062dffd9f629f7f5793c497bd2a86407e0b921382625dc65e81c253339a3d1e9d9a02bf398dd36e346907b3fe2
data/README.md CHANGED
@@ -85,7 +85,7 @@ layout: home
85
85
  ---
86
86
 
87
87
  ```
88
- To replicate the basic theme home page, replace this file with the following:
88
+ To replicate Editorial's theme home page, replace this file with the following:
89
89
 
90
90
  ```markdown
91
91
  ---
@@ -93,11 +93,11 @@ layout: home
93
93
  body_class: home
94
94
  title: "Hi, I’m Editorial<br /> by HTML5 UP & Middle Bear"
95
95
  subtitle: My overridden site.tagline
96
- description: "Aenean ornare velit lacus, ac varius enim ullamcorper eu. Proin aliquam facilisis ante interdum congue. Integer mollis, nisl amet convallis, porttitor magna ullamcorper, amet egestas mauris. Ut magna finibus nisi nec lacinia. Nam maximus erat id euismod egestas. Pellentesque sapien ac quam. Lorem ipsum dolor sit nullam."
96
+ description: "Check out the Github repo for the Editorial theme, or take a look at the code for this demo site, <a href='https://github.com/jekyll-theme-editorial/jekyll-theme-editorial.github.io/'>jekyll-theme-editorial.github.io</a>."
97
97
  banner:
98
- url: "/about"
99
- link_title: "Read About Editorial"
100
- button_text: "Learn More"
98
+ url: "https://github.com/middlebear/jekyll-theme-editorial"
99
+ link_title: "Visit the Editorial theme Github repo"
100
+ button_text: "Github Repo"
101
101
  images:
102
102
  banner:
103
103
  file: "pic10.jpg"
@@ -106,7 +106,7 @@ images:
106
106
  # NOTE: features are set in `/_data/features.yml`
107
107
  ---
108
108
 
109
- <!-- Responsive Banner -->
109
+ <!-- Banner -->
110
110
  {%-include responsive_banner.html-%}
111
111
 
112
112
  <!-- Section - Features -->
@@ -114,12 +114,11 @@ images:
114
114
 
115
115
  <!-- Section - Articles -->
116
116
  {%-include articles.html section_title="Neat Articles"-%}
117
-
118
117
  ```
119
118
 
120
- This adds three includes (`responsive_banner.html`, `features.html`, and `articles.html`) to the home page. The added yaml front matter is mainly there to configure the banner, although the `title` and `subtitle` keys can be used by the jekyll-seo-tag, for instance.
119
+ This adds three includes (`responsive_banner.html`, `features.html`, and `articles.html`) to the home page. The added yaml front matter is mainly there to configure the banner, although the `title` and `subtitle` keys can be used by the `jekyll-seo-tag` plugin, for instance.
121
120
 
122
- This index page is the root page of your site by default, and uses the special `home` layout from the theme. The `home` layout is generally only used by this index page, so that your homepage can have a unique feel and design. If you wish to change this layout, copy the file `_layouts/home.html` from the theme gem (or copy/download it from the Github repository for the theme gem) to your site's `~/my-jekyll-site/_layouts/home.html` file.
121
+ This index page is the root page of your site by default, and uses the special `home` layout from the Editorial theme. The `home` layout is generally only used by this site index page, so that your homepage can have a unique feel and design. If you wish to change this layout, copy the file `_layouts/home.html` from the theme gem (or copy/download it from the Github repository for the theme gem) to your site's `~/my-jekyll-site/_layouts/home.html` file.
123
122
 
124
123
  #### Aside: Finding the theme gem
125
124
 
@@ -170,6 +169,10 @@ scripts: # these scripts entries can be mov
170
169
  - file: comments.js
171
170
  ```
172
171
 
172
+ The Editorial theme convention is to keep image, script, and styling assets (as well as fonts) in separate subdirectories of the `/assets` directory, as defined by the three keys, `image_path`, `script_path`, and `style_path` above. You could set these to any paths you'd like (even setting them all to just `/assets/`), but remember that you'll need to move default assets from the theme gem into those folders, if you do make such changes.
173
+
174
+ The `scripts` key is an (ordered) array of script includes for every page in the site (placed at the end of the <abbr>HTML</abbr> `<head>` tag). `jquery.min.js` is of course the [jQuery](https://jquery.com/) library. The next 4 files provide basic interactivity and originates from the Editorial template by HTML5 UP. `email-obfuscation.js` provides utility functions to obfuscate and de-obfuscate email addresses for some light protection against email scraping and spam. `comments.js` provides interactivity for ([staticman](https://staticman.net/)-based) static comments (like form positioning and async response notification). These latter features will be documented separately.
175
+
173
176
  #### Change the site title/subtitle
174
177
 
175
178
  The title and subtitle of the site is configured by the site's `_config.yml` file, since this is usually a one-time configuration at the start of creating your site. Find this line in `_config.yml`:
@@ -178,7 +181,7 @@ The title and subtitle of the site is configured by the site's `_config.yml` fil
178
181
  title: Your awesome title
179
182
  ```
180
183
 
181
- and change it as you wish. Notice that the subtitle doesn't appear anywhere in this file. That's because it's inherited from the Editorial theme's configuration file, when the value is absent in your site's config file. Add the following line (typically, you'd place this right under the `title` key to group these together), changing the value as you desire:
184
+ and change it as you wish. Notice that the subtitle doesn't appear anywhere in this file (*if you're on Jekyll 4.0+*). That's because it's inherited from the Editorial theme's configuration file, when the value is absent in your site's config file. Add the following line (typically, you'd place this right under the `title` key to group these together), changing the value as you desire:
182
185
 
183
186
  ```yaml
184
187
  subtitle: by me and Middlebear
@@ -210,7 +213,10 @@ Features are simple components composed of an icon, a title, and some descriptiv
210
213
  icon: solid fa-gift
211
214
  ```
212
215
 
213
- Note that the `name` and `description` keys can incorporate html (but not Liquid filters/tags). The `icon` key is the class name(s) for the desired [Font Awesome](https://fontawesome.com/icons?d=gallery&m=free) icon. The free Font Awesome icons are divided into `regular`, `solid`, and `brand` variants. The `regular` icons need only a single class value (e.g., `fa-address-book`), but `solid` (e.g., `solid fa-address-book`) and `brand` (e.g., `brand fa-500px`) variants require adding `solid` or `brand` respectively to the class names for the `icon` key.
216
+ Note that the `name` and `description` keys can incorporate <abbr title="HyperText Markup Language">HTML</abbr> (but not Liquid filters/tags).
217
+
218
+ #### Using Font Awesome icon names
219
+ The `icon` key is the class name(s) for the desired [Font Awesome](https://fontawesome.com/icons?d=gallery&m=free) icon. The free Font Awesome icons are divided into `regular`, `solid`, and `brand` variants. The `regular` icons need only a single class value (e.g., `fa-address-book`), but `solid` (e.g., `solid fa-address-book`) and `brand` (e.g., `brand fa-500px`) variants require adding `solid` or `brand` respectively to the class names for the `icon` key.
214
220
 
215
221
  Now refresh the home page again, and you should see the 4 features you added show up in the Features section.
216
222
 
@@ -252,7 +258,7 @@ sidebar:
252
258
  identifier: signin
253
259
  ```
254
260
 
255
- Note that, for compatibility, this is the same basic format employed by the [jekyll-menus plugin](https://github.com/forestryio/jekyll-menus) plugin. However, the Editorial theme's basic menu system doesn't use the `weight` key for ordering entries as `jeyll-menus` does.
261
+ Note that, for compatibility, this is the same basic format (and file name) employed by the [jekyll-menus plugin](https://github.com/forestryio/jekyll-menus) plugin. However, the Editorial theme's basic menu system doesn't use the `weight` key for ordering entries as `jeyll-menus` does.
256
262
 
257
263
  Refresh the page, and you should now see the menu items populated under the "Menu" header. Since most of these pages don't yet exist at this point, they'll show the "404 Not Found" message.
258
264
 
@@ -406,9 +412,12 @@ Refreshing the page after saving this file should reveal a new set of social ico
406
412
 
407
413
  The introductory comments (text after `# `) provide configuration info for social icons. This list is used not only for the social icons in the site header, but also as templates for social links for people, posts, and pages elsewhere.
408
414
 
415
+ ### What about minima's `twitter_username` and `github_username`?
416
+ Jekyll's default theme, minima, defines two social media keys in the default `_config.yml` file: `twitter_username` and `github_username`. These two keys are not used by the Editorial theme, so at this point, you can keep them for flexibility or remove them to keep your site config file trim.
417
+
409
418
  ### Add the Elements page
410
419
 
411
- To view the site styling elements on a single page, save the following content into `_pages/elements.html`:
420
+ To view the site styling elements on a single page, save the following <abbr>HTML</abbr> content into `_pages/elements.html`:
412
421
 
413
422
  ```html
414
423
  ---
@@ -815,11 +824,11 @@ print 'It took ' + i + ' iterations to sort the deck.';
815
824
  </div>
816
825
  </div>
817
826
  ```
818
- To view the elements file in your browser, click the "Elements" link in the sidebar menu (`http://localhost:4000/elements`).
827
+ This <abrr>HTML</abbr> comes from the underlying Editorial template from HTML5 UP, and demonstrates the built-in styles available. To view the elements file in your browser, click the "Elements" link in the sidebar menu (`http://localhost:4000/elements`).
819
828
 
820
829
  ### Add site defaults to make posts render properly
821
830
 
822
- Because of a slight mismatch between HTML5 UP's CSS in the original Editorial HTML template and the default body classes assigned by Jekyll, we need to adjust some sitewide defaults to make posts render correctly. Although these preferences are set in the theme gem's `_config.yml` file, Jekyll doesn't use those defaults as "default defaults", so they must be replicated in your own site's configuration.
831
+ Because of a slight mismatch between HTML5 UP's <abbr title="Cascading Style Sheets">CSS</abbr> in the original Editorial <abbr>HTML</abbr> template and the default body classes assigned by Jekyll, we need to adjust some sitewide defaults to make posts render correctly. Although these preferences are set in the theme gem's `_config.yml` file, Jekyll doesn't use those defaults as "default defaults", so they must be replicated in your own site's configuration.
823
832
 
824
833
  With that in mind, add the following `defaults` key to you Jekyll site's `_config.yml` file:
825
834
 
@@ -848,15 +857,15 @@ defaults:
848
857
  comments: false
849
858
  published: true
850
859
  ```
851
- The only key of interest right now is `body_class` under the second entry's `values` key. This is set to `post` and will override jekyll's default body class of `posts`, giving us `<body class="post">` instead of `<body class="posts">` in the html of our post pages.
860
+ The only key of interest right now is `body_class` under the second entry's `values` key. This is set to `post` and will override jekyll's default body class of `posts`, giving us `<body class="post">` instead of `<body class="posts">` in the <abbr>HTML</abbr> of our post pages.
852
861
 
853
- Restart the Jekyll server and navigate your browser to the "Welcome to Jekyll!" post (should have a URL along the lines of `http://localhost:4000/jekyll/update/20yy/mm/dd/welcome-to-jekyll.html`) to see it properly styled.
862
+ Restart the Jekyll server and navigate your browser to the "Welcome to Jekyll!" post (should have a <abbr title="Uniform Resource Locator">URL</abbr> along the lines of `http://localhost:4000/jekyll/update/20yy/mm/dd/welcome-to-jekyll.html`) to see it properly styled.
854
863
 
855
864
  Notice also that the sidebar menu now lists the "Welcome to Jekyll!" post automatically under the "Recent Posts" menu item.
856
865
 
857
866
  #### Add the posts index page, and the pages collection
858
867
 
859
- To view a listing of posts once we have more than one, let's add a posts index page viewable at the relative URL `/posts/` in the browser. We employ a permalink and Jekyll's collections feature to achieve this desired routing. Create the page `~/my-jekyll-site/_pages/posts.html` (creating the `_pages` folder along the way if necessary):
868
+ To view a listing of posts once we have more than one, let's add a posts index page viewable at the relative <abbr>URL</abbr> `/posts/` in the browser. We employ a permalink and Jekyll's collections feature to achieve this desired routing. Create the page `~/my-jekyll-site/_pages/posts.html` (creating the `_pages` folder along the way if necessary):
860
869
 
861
870
  ```html
862
871
  ---
@@ -871,6 +880,7 @@ permalink: /posts/ # trailing slash makes it an `index.html` file ins
871
880
  {% include posts.html %}
872
881
  {% include pagination.html %}
873
882
  ```
883
+ This page is fairly straightforward. The page header is already included by the layout (`page` by default, set below in `_config.yml`) automatically, so we only need to include an intro paragraph and the posts list, sandwiched by pagination at the top and bottom of the page. We won't see pagination in action until later, when we discuss it specifically.
874
884
 
875
885
  We also need to tell Jekyll to output collection pages, so add the `collections` key to `_config.yml`:
876
886
 
@@ -1090,7 +1100,7 @@ collections:
1090
1100
  ```
1091
1101
 
1092
1102
  #### 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:
1103
+ 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
1104
 
1095
1105
  ```yaml
1096
1106
  - scope:
@@ -1121,11 +1131,11 @@ For the `authors` key under the `show` key in `_config.yml`, replace `false` wit
1121
1131
  show: # series of switches to customize what appears on the site
1122
1132
  authors: true # single author blogs may want to disable showing the same author everywhere
1123
1133
  ```
1124
- Restart the Jekyll server and click on the "People" link (which now has 3 sub-items too!) in the sidebar menu. Oops... you'll see an unstyled HTML listing page. We'll fix that next. In the meantime, you should be able to click on the three people listed to see their author pages. Why 3 and not 4? Because one of them is not yet published.
1134
+ Restart the Jekyll server and click on the "People" link (which now has 3 sub-items too!) in the sidebar menu. Oops... you'll see an unstyled <abbr>HTML</abbr> listing page. We'll fix that next. In the meantime, you should be able to click on the three people listed to see their author pages. Why 3 and not 4? Because one of them is not yet published.
1125
1135
 
1126
1136
  ### Add the Authors index page
1127
1137
 
1128
- To provide a nice list of authors, we'll take advantage of the theme's `author.html` include, which provides a standard block list format for an author. We iterate through our `site.people` and generate this include for each published author. We set the pages `permalink` in the front matter to `/people/` so that it overrides the ugly HTML index page we saw earlier. Incidentally, if `site.show.authors` is set to `false`, then we'll just show a "404 Not Found" page instead.
1138
+ To provide a nice list of authors, we'll take advantage of the theme's `author.html` include, which provides a standard block list format for an author. We iterate through our `site.people` and generate this include for each published author. We set the pages `permalink` in the front matter to `/people/` so that it overrides the ugly <abbr>HTML</abbr> index page we saw earlier. Incidentally, if `site.show.authors` is set to `false`, then we'll just show a "404 Not Found" page instead.
1129
1139
 
1130
1140
 
1131
1141
  ```liquid
@@ -1166,7 +1176,7 @@ Now let's add an author or two to our lone post, so we can see author bylines an
1166
1176
  author: [julia, petunia]
1167
1177
  ```
1168
1178
 
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 be,
1179
+ 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
1180
 
1171
1181
  ```yaml
1172
1182
  ---
@@ -1178,9 +1188,265 @@ tags: [jekyll, meta, technology, code, site, editorial theme]
1178
1188
  ---
1179
1189
  ```
1180
1190
 
1191
+ 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.
1192
+
1193
+ #### Add Author cards to posts
1194
+
1195
+ 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:
1196
+
1197
+ ```yaml
1198
+ show: # series of switches to customize what appears on the site
1199
+ authors: true # single author blogs may want to disable showing the same author everywhere
1200
+ post_authors: true # you may still want to show the author(s) at the bottom of posts
1201
+ ```
1202
+ 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.
1203
+
1181
1204
  ### Add Projects
1182
1205
 
1183
- TODO
1206
+ 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.
1207
+
1208
+ #### Set up the Projects collection
1209
+ As with the people collection, configure Jekyll in the `_config.yml` file to output our projects collection:
1210
+
1211
+ ```yaml
1212
+ ###################
1213
+ # Collections
1214
+ ###################
1215
+ collections:
1216
+ people:
1217
+ output: true
1218
+ pages:
1219
+ output: true
1220
+ projects: # find/put projects in `\_projects`
1221
+ output: true
1222
+ ```
1223
+ Now we have three entries&mdash;one each for people, pages, and projects&mdash;under the `collections` key in our `_config.yml` file.
1224
+
1225
+ #### Project page defaults
1226
+ Let's add in the relevant page defaults to the `_config.yml` file under the `defaults` key we defined earlier:
1227
+
1228
+ ```yaml
1229
+ - scope:
1230
+ path: ""
1231
+ type: "projects"
1232
+ values:
1233
+ layout: "project"
1234
+ menus: 'projects' # used by jekyll-menus plugin
1235
+ type: "projects"
1236
+ image_path: "/assets/images/"
1237
+ comments: false
1238
+ published: false
1239
+ ```
1240
+
1241
+ #### Create some projects
1242
+ 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:
1243
+
1244
+ ```sh
1245
+ :~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
1246
+ ```
1247
+ 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!
1248
+
1249
+
1250
+ ### Add the Projects index page
1251
+
1252
+ 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 <abbr>HTML</abbr> 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).
1253
+
1254
+ ```liquid
1255
+ ---
1256
+ title: Projects
1257
+ date: 2020-03-01 01:23:45 -0800
1258
+ permalink: /projects/
1259
+ ---
1260
+
1261
+ <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>
1262
+
1263
+ {% include projects.html %}
1264
+ ```
1265
+ 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.
1266
+
1267
+ #### Toggle summaries and dates for project pages
1268
+
1269
+ 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`:
1270
+
1271
+ ```yaml
1272
+ include_summary: [projects] # collections for which to show the summary in the header
1273
+ exclude_dates: [people, pages] # collections for which to not show dates in the header
1274
+ ```
1275
+ 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.
1276
+
1277
+ #### Add Author cards to projects
1278
+
1279
+ 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:
1280
+
1281
+ ```yaml
1282
+ show: # series of switches to customize what appears on the site
1283
+ authors: true # single author blogs may want to disable showing the same author everywhere
1284
+ post_authors: true # you may still want to show the author(s) at the bottom of posts
1285
+ page_authors: true # you may still want to show the author(s) for pages
1286
+ project_authors: true # you may still want to show the author(s) for projects
1287
+ ```
1288
+ 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.
1289
+
1290
+ ### Post decorations
1291
+
1292
+ 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:
1293
+
1294
+ ```yaml
1295
+ ---
1296
+ # defaults assumed for these jekyll variables: layout, permalink, published, excerpt
1297
+ # name the file similar to title (slugified - replace spaces with underscores & remove punctuation)
1298
+ title: "" # used in the page/post header, HTML title, menus & SEO
1299
+ subtitle: "" # optional; shown under the page/post header
1300
+ author: [] # use the handle of the author, not their name
1301
+ date: 2020-01-01 00:00:00 -0800 # publication date; overrides the file save date
1302
+ last_modified_at: # optional; date to show in addition to/in place of create date
1303
+ categories: [] # choose one best category, ideally
1304
+ tags: [] # choose 3-7 tags, ideally
1305
+ series: "Build a blog" # optional; use `series` to group posts and show a sidebar of posts in the series (limited to 1 for now)
1306
+ location: "New York, NY" # optional; location where the post was made
1307
+ website: https://example.com/ # optional; external, related website, possibly featured
1308
+ image: "" # default image for SEO & jekyll-feed
1309
+ images: # all images are optional; banner and either default or thumbnail are recommended
1310
+ default: # general-use size, default for lists if no thumbnail
1311
+ file: "" # no path, just the filename (e.g., "my great image.png")
1312
+ # default images generally use the default image texts, but can be specified here
1313
+ banner: # largest, full-page width landscape at top of page
1314
+ file: "" # no path, just the filename (e.g., "my great image.png")
1315
+ alt_text: "" # describe the image for screen readers
1316
+ caption: "" # optional explanatory text, can be used for attributions
1317
+ title: "" # optional; usually shown as a tooltip on hover
1318
+ thumbnail: # smaller image for lists/grids (like index pages)
1319
+ file: "" # no path, just the filename (e.g., "my great image.png")
1320
+ # thumbnails generally use the default image texts, but can be specified here
1321
+ # these texts are defaults for all images in the images array, if not individually specified:
1322
+ alt_text: "" # describe the image for screen readers
1323
+ caption: "" # optional explanatory text, can be used for attributions
1324
+ title: "" # optional; usually shown as a tooltip on hover
1325
+ canonical_url: "" # optional; customize the canonical URL for this page
1326
+ lang: "" # optional; language for the page, `en_US` by default
1327
+ description: "" # optional; short description of the page's content used for SEO
1328
+ # NOTE that the first paaragraph below is the excerpt, if no excerpt is defined here in the front matter.
1329
+ ---
1330
+ ```
1331
+
1332
+ #### Adding textual elements
1333
+ We'll first start by adding some textual elements, like subtitle and location. Add the following to our blog post's front matter:
1334
+
1335
+ ```yaml
1336
+ subtitle: "How Jekyll Makes It All So Easy!"
1337
+ location: "San Francisco, CA"
1338
+ website: https://jekyllrb.com/docs/home
1339
+ description: Let's make sure Google and company know enough about this page that it will pop up higher in search results
1340
+ ```
1341
+ 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 <abbr>HTML</abbr> `<head>` section).
1342
+
1343
+ #### The `last_modified_at` date and the `canonical_url`
1344
+
1345
+ Note that we can also add an extra date on top of the explicitly set `date` field in the front matter, and Jekyll's implicitly-set post date from the file name (YYYY-MM-DD-filename.ext). When you update a post, you don't necessarily want to change its original post date, or implicitly change its (canonical) <abbr>URL</abbr> along with it.
1346
+
1347
+ This is a good place to note that the `canonical_url` value is only used if the `jekyll-seo-tag` plugin is active, and it only changes the canonical <abbr>URL</abbr> `<link>` value in the <abbr>HTML</abbr> `<head>`, not the actual <abbr>URL</abbr> of the page (you'd still do this via the `permalink` key). Its use is for when the content of the page appears at multiple <abbr>URL</abbr>s, to denote the most original, or canonical, version of the page. Some site builders may want to explicitly display a link to the canonical version of the page, but the Editorial theme doesn't currently do this automatically for you when there is a `canonical_url` value present.
1348
+
1349
+ #### Adding a post to a series
1350
+
1351
+ 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:
1352
+
1353
+ ```yaml
1354
+ series: "build-a-blog"
1355
+ ```
1356
+ 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 sample series name just happens to be that way, to show that series names are unslugified and capitalized on display. This is useful if you have multiple series with the same name, but don't want them all grouped together, by making the names unique using only dashes and capitalization to create the illusion of multiple series with the same name.
1357
+
1358
+ ### Adding a post image
1359
+
1360
+ 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.
1361
+
1362
+ #### The Simplest, but least flexible, way to add an image
1363
+
1364
+ 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:
1365
+
1366
+ ```yaml
1367
+ image: "logo-2x.png"
1368
+ ```
1369
+ 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.
1370
+
1371
+ #### Adding alt text, title, and caption
1372
+
1373
+ Because <abbr>HTML</abbr> 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:
1374
+
1375
+ ```yaml
1376
+ alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
1377
+ image_title: "The Jekyll logo is so cool!"
1378
+ caption: "Jekyll lets you create static websites quickly and easily!"
1379
+ ```
1380
+ Add these lines, save, and refresh the page, and you should see a caption added to the bottom of the logo.
1381
+
1382
+ #### A more flexible middle option for images
1383
+
1384
+ 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):
1385
+
1386
+ ```yaml
1387
+ images:
1388
+ default:
1389
+ file: "logo-2x.png"
1390
+ alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
1391
+ title: "The Jekyll logo is so cool!"
1392
+ caption: "Jekyll lets you create static websites quickly and easily!"
1393
+ ```
1394
+ or alternatively,
1395
+
1396
+ ```yaml
1397
+ images:
1398
+ default: "logo-2x.png"
1399
+ alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
1400
+ title: "The Jekyll logo is so cool!"
1401
+ caption: "Jekyll lets you create static websites quickly and easily!"
1402
+ ```
1403
+
1404
+ You can even mix and match the prior two styles, for backwards compatibility:
1405
+
1406
+ ```yaml
1407
+ image: "logo-2x.png"
1408
+ images:
1409
+ alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
1410
+ title: "The Jekyll logo is so cool!"
1411
+ caption: "Jekyll lets you create static websites quickly and easily!"
1412
+ ```
1413
+
1414
+ #### The most flexible option for images
1415
+
1416
+ The prior structure sets us up to be able to add a few different versions of the image (`default`, `banner`, and `thumbnail`):
1417
+
1418
+ ```yaml
1419
+ images:
1420
+ default:
1421
+ file: "pic02.jpg"
1422
+ banner:
1423
+ file: "logo-2x.png"
1424
+ thumbnail:
1425
+ file: "pic06.jpg"
1426
+ alt_text: "A thumbnail version of the Jekyll logo, featuring stylized script and a red-liquid-filled test tube"
1427
+ title: "Read more about how to use Jekyll!"
1428
+ alt_text: "The Jekyll logo, featuring stylized script and a test tube filled with red, bubbling liquid"
1429
+ title: "The Jekyll logo is so cool!"
1430
+ caption: "Jekyll lets you create static websites quickly and easily!"
1431
+ ```
1432
+
1433
+ 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.
1434
+
1435
+ #### Missing image
1436
+
1437
+ 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 on the rendered page with the file name and image title in a box instead of a broken/missing image that Jekyll couldn't find during build.
1438
+
1439
+ ### Multiple posts and post navigation
1440
+
1441
+ 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:
1442
+
1443
+ ```sh
1444
+ :~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
1445
+ ```
1446
+ 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).
1447
+
1448
+ 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.
1449
+
1184
1450
 
1185
1451
  ## Setup Notes
1186
1452
 
@@ -1249,7 +1515,7 @@ If you want to link to your Github Pages site instead, you could, for instance,
1249
1515
 
1250
1516
 
1251
1517
  ##### Font Awesome Icons
1252
- The `icon` entry is the Font Awesome icon to be used, expressed as CSS class(es). It's likely Font Awesome already has an existing brand icon for the social media site, in which case, keep the `brands` value in this class list. You should always keep the `icon` class in the `icon` entry, so the resultant icon is rendered consistently.
1518
+ The `icon` entry is the Font Awesome icon to be used, expressed as <abbr>CSS</abbr> class(es). It's likely Font Awesome already has an existing brand icon for the social media site, in which case, keep the `brands` value in this class list. You should always keep the `icon` class in the `icon` entry, so the resultant icon is rendered consistently.
1253
1519
 
1254
1520
  You can also add new entries, like for a fictitious WhatsIt App:
1255
1521
 
@@ -1310,7 +1576,7 @@ TODO
1310
1576
  TODO
1311
1577
 
1312
1578
  ### Banner
1313
- One neat little trick buried in the CSS is the selective removal of `<br>` line breaks from the `h1` header of the `#banner` secion of a page. That's most prominently used on the sample home page, where there is a line break between "Editorial" and "by", which forces a particular spacing on large screens, where the header is beside the image, but gets removed on small (vertically-oriented) screens, where the header is below the image.
1579
+ One neat little trick buried in the <abbr>CSS</abbr> is the selective removal of `<br>` line breaks from the `h1` header of the `#banner` secion of a page. That's most prominently used on the sample home page, where there is a line break between "Editorial" and "by", which forces a particular spacing on large screens, where the header is beside the image, but gets removed on small (vertically-oriented) screens, where the header is below the image.
1314
1580
 
1315
1581
  ### Navigation
1316
1582
  The site navigation menu will auto-generate based on the contents of the `menus.yml` data file and the pages, posts, and projects you add to the site. By default, the menu will list the last 10 items for each type. It will also have links to each category page, a link to the tag index page, about, privacy, and terms.
@@ -1359,7 +1625,7 @@ Bug reports and pull requests are welcome on [GitHub](https://github.com/middleb
1359
1625
  The Editorial Jekyll theme is available as open source under the terms of the [CC BY 3.0 License](https://creativecommons.org/licenses/by/3.0/).
1360
1626
 
1361
1627
  ### [HTML5 UP](https://html5up.net) Credits
1362
- * HTML template: [AJ](mailto:"AJ" <aj@lkn.io>) | [🐦](https://twitter.com/ajlkn)<br> Free for personal and commercial use under the [CCA 3.0 license](https://html5up.net/license).
1628
+ * <abbr>HTML</abbr> template: [AJ](mailto:"AJ" <aj@lkn.io>) | [🐦](https://twitter.com/ajlkn)<br> Free for personal and commercial use under the [CCA 3.0 license](https://html5up.net/license).
1363
1629
  * Demo Images: [Unsplash](unsplash.com)
1364
1630
  * Icons: [Font Awesome](fontawesome.io)
1365
1631
  * Other: [jQuery](jquery.com), [Responsive Tools](https://github.com/ajlkn/responsive-tools)
@@ -24,11 +24,14 @@ 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
  ###################
30
- theme: jekyll-theme-editorial # this theme! =)
31
- permalink: /:collection/:title:output_ext # NOTE: changing this default hasn't been tested
31
+ theme: jekyll-theme-editorial # this theme! =)
32
+ remote_theme: middlebear/jekyll-theme-editorial # only needed on github pages, which automatically compiles jekyll for you
33
+ # remote_theme: middlebear/jekyll-theme-editorial@0.1.0 # to lock to a given version - https://github.com/benbalter/jekyll-remote-theme
34
+ permalink: /:collection/:title:output_ext # NOTE: changing this default hasn't been tested
32
35
  # lsi: true # provides related posts functionality using classifier-reborn - unsupported by github pages
33
36
 
34
37
 
@@ -95,7 +98,7 @@ analytics:
95
98
  goatcounter: # goatcounter for personal websites is free
96
99
  code: # required if using goatcounter for stats; leave blank otherwise
97
100
  allow_local: false # set `true` to test analytics locally, otherwise stats won't be sent from localhost to goatcounter
98
- staticman_url: # https://{{bridge_app_name}}.herokuapp.com/v2/entry/{{github-username}}/{{blog-repo}}/{{branch}}/comments
101
+ staticman_url: # the URL for the staticman API bridge endpoint: https://{{bridge_app_name}}.herokuapp.com/v2/entry/{{github-username}}/{{blog-repo}}/{{branch}}/comments
99
102
  search: # site search parameters; NOTE: untested for now
100
103
  url: # default: "/search"; where the search form POSTs to
101
104
  form_method: # default: "post"; typically "post" or "get"--how the search form gets submitted
@@ -209,14 +212,6 @@ feed:
209
212
  jekyll-mentions: /people
210
213
 
211
214
 
212
- ###################
213
- # Remote Theme - https://github.com/benbalter/jekyll-remote-theme
214
- # only needed on github pages, which automatically compiles jekyll for you
215
- ###################
216
- remote_theme: middlebear/jekyll-theme-editorial
217
- # remote_theme: middlebear/jekyll-theme-editorial@0.1.0 # to lock to a given version
218
-
219
-
220
215
  ###################
221
216
  # Jekyll Paginate - https://jekyllrb.com/docs/pagination/
222
217
  ###################
@@ -16,10 +16,10 @@ sidebar:
16
16
  title: Recent Posts
17
17
  identifier: posts
18
18
  weight: 20
19
- # - url: /archives
20
- # title: Archives
21
- # identifier: archives
22
- # weight: 21
19
+ - url: /archives
20
+ title: Archives
21
+ identifier: archives
22
+ weight: 21
23
23
  - url: /categories
24
24
  title: Categories
25
25
  identifier: categories
@@ -1,6 +1,6 @@
1
1
  {%-assign archived = site.jekyll-archives.enabled-%}
2
2
  {%-if archived contains 'year' or archived contains 'month' or archived contains 'day'-%}
3
- {%-assign archives_menu = site.data.navigation | find: "identifier", "archives"-%}
3
+ {%-assign archives_menu = site.data.navigation | where: "identifier", "archives" | first-%}
4
4
  {%-assign posts_by_year = site.posts | group_by_exp: "post", "post.date | date: '%Y'"-%}
5
5
  {%-assign years = posts_by_year | map: 'name'-%}
6
6
  {%-assign firsts = "1,21,31" | split: ','-%}
@@ -20,9 +20,12 @@ 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
- {%-if site.show.post_authors and page.type=="posts"-%}
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 | find: 'handle', slug-%}
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 {{ author.handle-}}'s bio">{{-author_name-}}</a></li>
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-%}
@@ -1,10 +1,17 @@
1
- {%-assign static_file_names = site.static_files | map: 'name'-%}
2
- {%-if static_file_names contains page.image or static_file_names contains page.images.banner.file or static_file_names contains page.images.default.file or static_file_names contains page.images.file %}
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-}}{{-page.image | default: page.images.banner.file | default: page.images.default.file-}}" title="{{-page.images.banner.title | default: page.images.default.title | default: page.images.title | default: page.image_title-}}" alt="{{-page.images.banner.alt_text | default: page.images.default.alt_text | default: page.images.alt_text | default: page.alt_text-}}"/>
6
- {%-if page.caption or page.images.banner.caption or page.images.default.caption or page.images.caption or page.caption %}
7
- <figcaption>{{-page.images.banner.caption | default: page.images.default.caption | default: page.images.caption | default: page.caption | markdownify-}}</figcaption>
8
- {%-endif %}
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
- {%-endif %}
15
+ {%-else %}
16
+ <figure class="box"><h3>Missing image</h3>{{-banner_image-}}<br>{{-banner_title-}}</figure>
17
+ {%-endif %}
@@ -15,28 +15,29 @@
15
15
  {% elsif site.email and site.show.email_address-%}
16
16
  <li class="icon solid fa-envelope"><a href="mailto:{{-site.email-}}" class="u-email" title="{{-email_title-}}">{{-site.email-}}</a></li>
17
17
  {%-endif-%}
18
- {% if site.contact.phone-%}
18
+ {% if site.contact.phone != blank-%}
19
19
  <li class="icon solid fa-phone p-tel">{{-site.contact.phone-}}</li>
20
20
  {%-endif-%}
21
- {% if site.contact.address-%}
21
+ {% unless site.contact.address.line1 == blank and site.contact.address.line2 == blank and site.contact.address.line3 == blank and site.contact.address.city == blank and site.contact.address.state == blank and site.contact.address.zipcode == blank-%}
22
22
  <li class="icon solid fa-home p-adr h-adr">
23
23
  <address>
24
- {% if site.contact.address.line1-%}
24
+ {% if site.contact.address.line1 != blank-%}
25
25
  <span class="p-street-address">{{ site.contact.address.line1 }}</span><br />
26
26
  {%-endif-%}
27
- {% if site.contact.address.line2 or site.contact.address.line3-%}
27
+ {% unless site.contact.address.line2 == blank and site.contact.address.line3 == blank-%}
28
28
  <span class="p-extended-address">
29
29
  {{-site.contact.address.line2 }}
30
- {%-if site.contact.address.line3-%}{{ site.contact.address.line3 | prepend: "<br />" }}{%-endif-%}
30
+ {%-if site.contact.address.line2 != blank and site.contact.address.line3 != blank-%}<br />{%-endif-%}
31
+ {{ site.contact.address.line3-}}
31
32
  </span><br />
32
- {%-endif-%}
33
- {% if site.contact.address.city or site.contact.address.state or site.contact.address.zipcode-%}
33
+ {%-endunless-%}
34
+ {% unless site.contact.address.city == blank and site.contact.address.state == blank and site.contact.address.zipcode == blank-%}
34
35
  <span class="p-locality">{{ site.contact.address.city }}</span>
35
36
  <span class="p-region">{{ site.contact.address.state }}</span>
36
37
  <span class="p-postal-code">{{-site.contact.address.zipcode-}}</span><br />
37
- {%-endif %}
38
+ {%-endunless %}
38
39
  </address>
39
40
  </li>
40
- {% endif-%}
41
+ {% endunless-%}
41
42
  </ul>
42
43
  </section> <!-- End Section - Contact -->
@@ -2,5 +2,5 @@
2
2
  Placeholder to allow defining custom head, including analytics; in principle, you can add anything here, e.g. favicons:
3
3
 
4
4
  1. Head over to https://realfavicongenerator.net/ to add your own favicons.
5
- 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet.
5
+ 2. Customize default _includes/custom_head.html in your source directory and insert the given code snippet.
6
6
  {% endcomment %}
@@ -15,7 +15,7 @@ local:
15
15
 
16
16
  <ul class="inline csv authors">
17
17
  {%-for auth in authors-%}
18
- {%-assign author = site.people | find: 'handle', auth-%}
18
+ {%-assign author = site.people | where: 'handle', auth | first-%}
19
19
  {%-if author.published-%}
20
20
  <li>{{-author.name-}}</li>
21
21
  {%-elsif auth-%}
@@ -1,5 +1,5 @@
1
1
  {%-assign item_limit = include.item_limit | default: 12-%}
2
- {%-assign peeps = site.collections | find: "label", 'people'-%}
2
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
3
3
 
4
4
  {%-if site.menus != nil and site.plugins contains 'jekyll-menus' %}
5
5
  {% comment-%} the following version of the menu depends on jekyll-menus {%-endcomment-%}
@@ -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 | where: 'identifier', 'projects' | first-%}
3
3
  {%-if published_projects != empty %}
4
4
  <!-- Section - Mini-posts -->
5
5
  <section>
@@ -1,4 +1,4 @@
1
- {%-assign peeps = site.collections | find: "label", 'people'-%}
1
+ {%-assign peeps = site.collections | where: "label", 'people' | first-%}
2
2
  {%-assign authors = include.author | default: page.author-%}
3
3
  {%-assign page_title = include.page_title | default: page.title-%}
4
4
  {%-assign subtitle = include.subtitle | default: page.subtitle-%}
@@ -43,7 +43,7 @@ local:
43
43
  <p class="byline">
44
44
  {%-if site.show.authors %}
45
45
  {%-for auth in pg.author-%}
46
- {%-assign author = site.people | find: 'handle', auth-%}
46
+ {%-assign author = site.people | where: 'handle', auth | first-%}
47
47
  {%-if author.published and author.url-%}
48
48
  <a href="{{-author.url-}}" rel="author" itemprop="author" class="u-author p-author" title="Read {{ author.name | split: ' ' | first-}}'s bio">{{-author.name-}}</a>
49
49
  {%-elsif author.published-%}
@@ -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-%}
@@ -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 %}
@@ -1,88 +1,22 @@
1
1
  {%-comment-%}
2
2
  lists projects as section cards given a projects hash
3
3
 
4
- inputs: none
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
- site.static_files lookup and make sure a placeholder.png file exists
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
- {%-assign projects = site.projects-%}
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
- {%-if project.published %}
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-%}{{-"&nbsp; | &nbsp;"-}}{%-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>{{-page.banner.header | default: page.title | default: site.title-}}</h1>
10
- <p>{{-page.banner.subheader | default: page.subtitle | default: site.tagline-}}</p>
18
+ <h1>{{-banner_header-}}</h1>
19
+ <p>{{-banner_subheader-}}</p>
11
20
  </header>
12
- <p>{{-page.banner.content | default: page.description | default: site.description-}}</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-}}{{-page.banner.image | default: page.images.banner.file | default: page.images.banner | default: page.image-}}" alt="{{-page.banner.alt_text | default: page.images.banner.alt_text | default: page.images.alt_text | default: page.alt_text-}}" title="{{-page.banner.image_title | default: page.images.banner.title | default: page.images.title | default: page.image_title-}}"/>
28
+ <img src="{{-site.image_path-}}{{-banner_image-}}" alt="{{-banner_alt_text-}}" title="{{-banner_title-}}"/>
19
29
  </figure>
20
- </section>
30
+ {%-else %}
31
+ <figure class="box"><h3>Missing image</h3>{{-banner_image-}}<br>{{-banner_title-}}</figure>
32
+ {%-endif %}
33
+ </section>
@@ -13,8 +13,8 @@ layout: default
13
13
 
14
14
  {% assign formatted_date = page.date | date: date_format %}
15
15
  {% assign title = formatted_date | append: ' Archives' %}
16
- {%-assign projects = site.projects | where_exp: 'project', 'project.date == formatted_date and project.published == true'-%}
17
- {%-assign pages = site.pages | where_exp: 'pg', 'pg.date == formatted_date and pg.published == true'-%}
16
+ {%-assign projects = site.projects | where_exp: "project", "project.date == formatted_date" | where: "published", "true"-%}
17
+ {%-assign pages = site.pages | where_exp: "pg", "pg.date == formatted_date" | where: "published", "true"-%}
18
18
 
19
19
  <section>
20
20
  {% include page_header.html page_title=title %}
@@ -3,8 +3,9 @@ layout: default
3
3
  ---
4
4
 
5
5
  {%-assign title = page.title | default: page.category | capitalize | prepend: 'Filed under "' | append: '"'-%}
6
- {%-assign projects = site.projects | where_exp: 'project', 'project.categories contains page.title and project.published == true'-%}
7
- {%-assign pages = site.pages | where_exp: 'pg', 'pg.categories contains page.title and pg.published == true'-%}
6
+ {%-assign projects = site.projects | where_exp: "project", "project.categories contains page.title" | where: "published", "true"-%}
7
+ {%-assign pages = site.pages | where_exp: "pg", "pg.categories contains page.title" | where: "published", "true"-%}
8
+
8
9
 
9
10
  <section>
10
11
  {% include page_header.html page_title=title %}
@@ -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>
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  layout: default
3
+ excerpt: "" # NOTE: this empty excerpt fixes liquid "'if' tag was never closed included" error: https://jekyllrb.com/docs/troubleshooting/#excerpts
3
4
  ---
4
5
 
5
6
  {%-assign title = page.title | default: page.tag | prepend: 'Tagged "' | append: '"'-%}
6
- {%-assign projects = site.projects | where_exp: 'project', 'project.tags contains page.title and project.published == true'-%}
7
- {%-assign pages = site.pages | where_exp: 'pg', 'pg.tags contains page.title and pg.published == true'-%}
7
+ {%-assign projects = site.projects | where_exp: "project", "project.tags contains page.title" | where: "published", "true"-%}
8
+ {%-assign pages = site.pages | where_exp: "pg", "pg.tags contains page.title" | where: "published", "true"-%}
8
9
 
9
10
  <section>
10
11
  {% include page_header.html page_title=title %}
@@ -38,8 +38,8 @@ excerpt: "" # NOTE: this empty excerpt fixes liquid "'if' tag was
38
38
  {%-for year in posts_by_year %}
39
39
  {%-assign year_url = site.jekyll-archives.permalinks.year | replace: ':year', year.name-%}
40
40
  {%-comment-%}
41
- {%-assign year_projects = projects_by_year | find: 'name', year.name-%}
42
- {%-assign year_pages = pages_by_year | find: 'name', year.name-%}
41
+ {%-assign year_projects = projects_by_year | where: 'name', year.name | first-%}
42
+ {%-assign year_pages = pages_by_year | where: 'name', year.name | first-%}
43
43
  {%-endcomment-%}
44
44
  <h2{%-if is_year_archive %} class="tight"{%-endif-%}>
45
45
  {% if archives_available and archived contains 'year'-%}
@@ -59,8 +59,8 @@ excerpt: "" # NOTE: this empty excerpt fixes liquid "'if' tag was
59
59
  {%-assign month_name = month.name | date: '%m'-%}
60
60
  {%-assign month_url = site.jekyll-archives.permalinks.month | replace: ':year', year.name | replace: ':month', month_name-%}
61
61
  {%-comment-%}
62
- {%-assign month_projects = projects_by_month | find: 'name', month.name-%}
63
- {%-assign month_pages = pages_by_month | find: 'name', month.name-%}
62
+ {%-assign month_projects = projects_by_month | where: 'name', month.name | first-%}
63
+ {%-assign month_pages = pages_by_month | where: 'name', month.name | first-%}
64
64
  {%-endcomment-%}
65
65
  <h3 class="tight">
66
66
  {% if archives_available and archived contains 'month'-%}
@@ -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.6
4
+ version: 1.0.11
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-04 00:00:00.000000000 Z
11
+ date: 2020-08-15 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