jekyll-theme-editorial 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +143 -8
- data/_config.yml +12 -12
- data/_includes/item_image.html +4 -3
- data/_pages/people.html +3 -3
- data/index.md +4 -4
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c17e4e3729eec2d2187e99bc67b2a2b69490f2376d86c124b4f096e47072c7c4
|
4
|
+
data.tar.gz: ff2b0c32c2943d1a7a3046dea4df53603d0d9d22a1257fa8b3be3bc074f72eb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ccdef2cba4a660e42097ad8d49c8c44a2f6eb53f9a3fc635103a3833461f410fb175c48e434b39758d9ca8f8cf68717c09ebb11a8d4720f6b1f15b0bbc93a55
|
7
|
+
data.tar.gz: db0167399c786ab02e3222311c6d3f40959c05789c441f1f093ef9d576a9efa82cb7e07fcbd1c8b16f6ec2fd36f26127675dc91db74d9ec21004d0679a240adb
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ Here are some basic principles I attempted to adhere to:
|
|
25
25
|
|
26
26
|
Note that `:~$` is the shell prompt, so copy and paste the bits *after* that (and the 2 lines in the middle represent the `jekyll` command's output):
|
27
27
|
|
28
|
-
```
|
28
|
+
```sh
|
29
29
|
:~$ jekyll new my-jekyll-site
|
30
30
|
... a bunch of output from Jekyll ...
|
31
31
|
New jekyll site installed in ~/my-jekyll-site.
|
@@ -36,7 +36,7 @@ This will create the basic structure of your Jekyll site with all the default fi
|
|
36
36
|
|
37
37
|
You can then run it to see the default site in your browser (`:~/my-jekyll-site$` is the shell prompt, so don't copy that part):
|
38
38
|
|
39
|
-
```
|
39
|
+
```sh
|
40
40
|
:~/my-jekyll-site$ bundle exec jekyll serve
|
41
41
|
```
|
42
42
|
|
@@ -56,12 +56,14 @@ theme: jekyll-theme-editorial
|
|
56
56
|
|
57
57
|
And then to download and make it available to your site, execute:
|
58
58
|
|
59
|
-
|
60
|
-
|
59
|
+
```sh
|
60
|
+
:~/my-jekyll-site$ bundle
|
61
|
+
```
|
61
62
|
Or directly install it yourself as:
|
62
63
|
|
63
|
-
|
64
|
-
|
64
|
+
```sh
|
65
|
+
:~/my-jekyll-site$ gem install jekyll-theme-editorial
|
66
|
+
```
|
65
67
|
Then run `bundle exec jekyll serve` (or the shorter `jekyll s` if your setup allows) to see the site so far.
|
66
68
|
|
67
69
|
Unless you already had content likes posts and an index file, you'll be staring at largely a blank page, along with a collapsible left menu sidebar and site header, at this point. That's ok, move on to the next section!
|
@@ -119,10 +121,55 @@ This adds three includes (`responsive_banner.html`, `features.html`, and `articl
|
|
119
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
123
|
|
124
|
+
#### Aside: Finding the theme gem
|
125
|
+
|
126
|
+
It's sometimes difficult to find the theme gem on your system, especially if you're using a version manager, such as [RVM](https://rvm.io "Ruby Version Manager"), along with [bundler](https://bundler.io/ "Rubygems Bundler") for managing gems. Here's the handy incantation `bundle info --path` for finding the directory where a particular gem is installed (assuming it was installed using bundler):
|
127
|
+
|
128
|
+
```sh
|
129
|
+
:~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
|
130
|
+
~/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/jekyll-theme-editorial-1.0.2
|
131
|
+
```
|
132
|
+
You can then copy the path and `cd` into it:
|
133
|
+
|
134
|
+
```sh
|
135
|
+
:~/my-jekyll-site$ cd ~/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/jekyll-theme-editorial-1.0.2
|
136
|
+
:~/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/jekyll-theme-editorial-1.0.2$
|
137
|
+
```
|
138
|
+
|
139
|
+
or, at least on macOS, you can directly `open` the gem directory in Finder with:
|
140
|
+
|
141
|
+
```sh
|
142
|
+
:~/my-jekyll-site$ open ~/.rvm/rubies/ruby-2.7.1/lib/ruby/gems/2.7.0/gems/jekyll-theme-editorial-1.0.2
|
143
|
+
```
|
144
|
+
There, you can copy any file from the gem and place it into the corresponding folder of your site to make modifications and enhancements to any part of the theme that you wish.
|
145
|
+
|
146
|
+
#### Viewing the site index page
|
147
|
+
|
122
148
|
At this point, you may also want to change the name of this file from `index.markdown` to the shorter and more conventional `index.md`.
|
123
149
|
|
124
150
|
Assuming you left `jekyll serve` running, efresh your browser (on `http://localhost:4000/`) to see the changes so far. You should see a banner with an image, an empty Features section, and an Articles section with one post, "Welcome to Jekyll!".
|
125
151
|
|
152
|
+
#### Add asset paths to site configuration
|
153
|
+
|
154
|
+
Since its 4.0 release, Jekyll has supported theme configuration defaults by including a `_config.yml` file in the theme gem. This support doesn't yet seem to be universal however. If you're working in an environment that doesn't yet support config defaults being pulled from the theme's gem (like Github pages, which currently uses Jekyll v3.8.7), you'll need to directly add site asset paths to your `_config.yml`:
|
155
|
+
|
156
|
+
```yaml
|
157
|
+
###################
|
158
|
+
# Theme settings
|
159
|
+
###################
|
160
|
+
image_path: '/assets/images/' # site-wide default path for images
|
161
|
+
script_path: '/assets/js/' # site-wide default path for scripts
|
162
|
+
style_path: '/assets/css/' # site-wide default path for styles
|
163
|
+
scripts: # these scripts entries can be moved to `_data/scripts.yml` for cleaner and more dynamic script inclusion
|
164
|
+
- file: jquery.min.js
|
165
|
+
- file: browser.min.js
|
166
|
+
- file: breakpoints.min.js
|
167
|
+
- file: util.js
|
168
|
+
- file: main.js
|
169
|
+
- file: email-obfuscation.js
|
170
|
+
- file: comments.js
|
171
|
+
```
|
172
|
+
|
126
173
|
#### Change the site title/subtitle
|
127
174
|
|
128
175
|
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`:
|
@@ -139,7 +186,7 @@ subtitle: by me and Middlebear
|
|
139
186
|
|
140
187
|
As the default introductory comments in `_config.yml` note, you have to restart the jekyll server for site configuration changes (changes to this file only) to be applied. First, quit the running jekyll server by pressing `ctrl-c`, and restart it again with the same command (or `bundle exec jekyll serve` if necessary):
|
141
188
|
|
142
|
-
```
|
189
|
+
```sh
|
143
190
|
:~/my-jekyll-site$ jekyll s
|
144
191
|
```
|
145
192
|
Refresh your browser page (on `http://localhost:4000/`) to see the changes you made at the top of the page in the site header area.
|
@@ -828,6 +875,9 @@ permalink: /posts/ # trailing slash makes it an `index.html` file ins
|
|
828
875
|
We also need to tell Jekyll to output collection pages, so add the `collections` key to `_config.yml`:
|
829
876
|
|
830
877
|
```yaml
|
878
|
+
###################
|
879
|
+
# Collections
|
880
|
+
###################
|
831
881
|
collections:
|
832
882
|
pages:
|
833
883
|
output: true
|
@@ -1023,7 +1073,92 @@ jekyll-archives:
|
|
1023
1073
|
|
1024
1074
|
### Add People
|
1025
1075
|
|
1026
|
-
|
1076
|
+
Sone sites will have multiple people associated with it, as authors or otherwise, so let's add a people collection to our site.
|
1077
|
+
|
1078
|
+
#### Set up the People collection
|
1079
|
+
First, let's tell Jekyll, in our `_config.yml` file, to output our new people collection to individual pages:
|
1080
|
+
|
1081
|
+
```yaml
|
1082
|
+
###################
|
1083
|
+
# Collections
|
1084
|
+
###################
|
1085
|
+
collections:
|
1086
|
+
people: # find/put people in `\_people`
|
1087
|
+
output: true
|
1088
|
+
pages:
|
1089
|
+
output: true
|
1090
|
+
```
|
1091
|
+
|
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:
|
1094
|
+
|
1095
|
+
```yaml
|
1096
|
+
- scope:
|
1097
|
+
path: ""
|
1098
|
+
type: "people"
|
1099
|
+
values:
|
1100
|
+
layout: "author"
|
1101
|
+
menus: 'authors' # used by jekyll-menus plugin
|
1102
|
+
type: "people"
|
1103
|
+
image_path: "/assets/images/"
|
1104
|
+
author_bio: "<p>We're still working on a fabulous author bio and page. Check back later to learn more!</p>"
|
1105
|
+
comments: false
|
1106
|
+
published: true
|
1107
|
+
```
|
1108
|
+
|
1109
|
+
#### Create some people
|
1110
|
+
At this point, nothing on the site will have changed. Now we need to add a person or two. Being lazy bears, instead of creating these pages from scratch, we'll just copy them from the Editorial theme gem. As a refresher, to find the theme gem, use
|
1111
|
+
|
1112
|
+
```sh
|
1113
|
+
:~/my-jekyll-site$ bundle info --path jekyll-theme-editorial
|
1114
|
+
```
|
1115
|
+
From the Editorial theme gem directory, we'll copy the whole `_people` directory, which includes 4 people files, to our own site directory. Directories that begin with an underscore ('_') are special to Jekyll. In this case, it houses our people collection.
|
1116
|
+
|
1117
|
+
#### Turn show authors back on (if turned off before)
|
1118
|
+
For the `authors` key under the `show` key in `_config.yml`, replace `false` with `true`:
|
1119
|
+
|
1120
|
+
```yaml
|
1121
|
+
show: # series of switches to customize what appears on the site
|
1122
|
+
authors: true # single author blogs may want to disable showing the same author everywhere
|
1123
|
+
```
|
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.
|
1125
|
+
|
1126
|
+
### Add the Authors index page
|
1127
|
+
|
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.
|
1129
|
+
|
1130
|
+
|
1131
|
+
```liquid
|
1132
|
+
---
|
1133
|
+
title: Authors
|
1134
|
+
date: 2020-01-02 01:23:45 -0800
|
1135
|
+
author_bio: "<p>We're still working on this bio!</p>"
|
1136
|
+
permalink: /people/ # trailing slash makes it an `index.html` file inside the `/people/` directory, rather than a `people.html` file in the root
|
1137
|
+
---
|
1138
|
+
|
1139
|
+
{% if site.show.authors-%}
|
1140
|
+
{% assign peeps = site.collections | find: "label", 'people'-%}
|
1141
|
+
{% if peeps.output-%}
|
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
|
+
<hr class="major"/>
|
1144
|
+
{% if site.show.authors %}
|
1145
|
+
{% for author in site.people %}
|
1146
|
+
{%-if author.published %}
|
1147
|
+
{% include author.html %}
|
1148
|
+
{%-else-%}
|
1149
|
+
{% include author.html excerpt=page.author_bio %}
|
1150
|
+
{%-endif %}
|
1151
|
+
<hr class="major"/>
|
1152
|
+
{% endfor %}
|
1153
|
+
{% endif %}
|
1154
|
+
{% endif %}
|
1155
|
+
{%-else-%}
|
1156
|
+
{% include 404.html %}
|
1157
|
+
{%-endif-%}
|
1158
|
+
```
|
1159
|
+
If all went well, you should be able to refresh the ugly people index listing and get a nicely formatted one in its place.
|
1160
|
+
|
1161
|
+
### Add Authors to our lone post
|
1027
1162
|
|
1028
1163
|
### Add Projects
|
1029
1164
|
|
data/_config.yml
CHANGED
@@ -283,14 +283,14 @@ jekyll-archives:
|
|
283
283
|
# Jekyll SEO Tag - https://github.com/jekyll/jekyll-seo-tag
|
284
284
|
###################
|
285
285
|
twitter:
|
286
|
-
username:
|
286
|
+
username: middlebear2 # This site's Twitter handle
|
287
287
|
card: summary # This site's default card type
|
288
|
-
facebook:
|
289
|
-
|
290
|
-
|
291
|
-
|
288
|
+
# facebook:
|
289
|
+
# app_id: 1239284 # Facebook app ID for Facebook insights
|
290
|
+
# publisher: 1232529 # Facebook page URL or ID of the publishing entity
|
291
|
+
# admins: 1236093 # Facebook user ID for domain insights linked to a personal account
|
292
292
|
social: # use `_data/social.yml` to configure visible links to social media
|
293
|
-
name: "
|
293
|
+
name: "Middle Bear"
|
294
294
|
links:
|
295
295
|
- https://twitter.com/middlebear2
|
296
296
|
- https://gravatar.com/middlebear2
|
@@ -298,9 +298,9 @@ social: # use `_data/social.yml` to configure visible link
|
|
298
298
|
- https://rubygems.org/profiles/middlebear
|
299
299
|
- https://twitter.com/jekyllrb
|
300
300
|
- https://github.com/jekyll
|
301
|
-
webmaster_verifications:
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
301
|
+
# webmaster_verifications:
|
302
|
+
# google: UA-1234-1
|
303
|
+
# bing: 1234
|
304
|
+
# alexa: 1234
|
305
|
+
# yandex: 1234
|
306
|
+
# baidu: 1234
|
data/_includes/item_image.html
CHANGED
@@ -10,12 +10,13 @@ local:
|
|
10
10
|
image the image to render as the article image
|
11
11
|
alt_text the alt text to use for the image, for screen readers
|
12
12
|
img_title the image title to use for the image
|
13
|
+
NOTE: github doesn't like the `find` filter - change to `where` for now
|
13
14
|
{%-endcomment-%}
|
14
15
|
|
15
16
|
{%-assign item = article | default: post | default: project | default: pg | default: page-%}
|
16
|
-
{%-assign placeholder = site.static_files |
|
17
|
+
{%-assign placeholder = site.static_files | where: 'name', 'placeholder.png'-%}
|
17
18
|
{%-assign static_file_names = site.static_files | map: 'name'-%}
|
18
|
-
{%-assign image = item.images.thumbnail.file | default: item.images.default.file | default: item.images.banner.file | default: item.thumbnail | default: item.image | default: item.banner | default: placeholder.name-%}
|
19
|
+
{%-assign image = item.images.thumbnail.file | default: item.images.default.file | default: item.images.banner.file | default: item.thumbnail | default: item.image | default: item.banner | default: placeholder.first.name-%}
|
19
20
|
{%-assign alt_text = item.images.thumbnail.alt_text | default: item.images.default.alt_text | default: item.images.banner.alt_text | default: item.images.alt_text | default: item.alt_text | default: item.banner.alt_text-%}
|
20
21
|
{%-assign img_title = item.images.thumbnail.title | default: item.images.default.title | default: item.images.banner.title | default: item.images.title | default: item.title | default: item.banner.title-%}
|
21
22
|
|
@@ -23,7 +24,7 @@ local:
|
|
23
24
|
{%-if static_file_names contains image %}
|
24
25
|
<img src="{{-item.image_path | default: site.image_path-}}{{-image-}}" itemprop="thumbnail" class="u-photo" title="{{-img_title-}}" alt="{{-alt_text-}}"/>
|
25
26
|
{%-elsif image == empty %}
|
26
|
-
<img src="{{-item.image_path | default: site.image_path-}}{{-placeholder.name-}}" title="{{-img_title-}}" alt="{{-alt_text-}}"/>
|
27
|
+
<img src="{{-item.image_path | default: site.image_path-}}{{-placeholder.first.name-}}" title="{{-img_title-}}" alt="{{-alt_text-}}"/>
|
27
28
|
{%-else %}
|
28
29
|
<div class="box"><h3>Missing image</h3>{{-image-}}<br>{{-img_title-}}</div>
|
29
30
|
{%-endif %}
|
data/_pages/people.html
CHANGED
@@ -5,9 +5,9 @@ author_bio: "<p>We're still working on this bio!</p>"
|
|
5
5
|
permalink: /people/ # trailing slash makes it an `index.html` file inside the `/people/` directory, rather than a `people.html` file in the root
|
6
6
|
---
|
7
7
|
|
8
|
-
{% if site.show.authors
|
9
|
-
{% assign peeps = site.collections | find: "label", 'people'
|
10
|
-
{% if peeps.output
|
8
|
+
{% if site.show.authors-%}
|
9
|
+
{% assign peeps = site.collections | find: "label", 'people'-%}
|
10
|
+
{% if peeps.output-%}
|
11
11
|
<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>
|
12
12
|
<hr class="major"/>
|
13
13
|
{% if site.show.authors %}
|
data/index.md
CHANGED
@@ -4,11 +4,11 @@ layout: home
|
|
4
4
|
body_class: home
|
5
5
|
title: "Hi, I’m Editorial<br /> by HTML5 UP & Middle Bear"
|
6
6
|
subtitle: # overrides `site.tagline`, the default
|
7
|
-
description: "
|
7
|
+
description: "Check out the Github repo for the Editorial theme, or take a look at the code for the demo site, <a href='https://github.com/jekyll-theme-editorial/jekyll-theme-editorial.github.io/'>jekyll-theme-editorial.github.io</a>."
|
8
8
|
banner:
|
9
|
-
url: "/
|
10
|
-
link_title: "
|
11
|
-
button_text: "
|
9
|
+
url: "https://github.com/middlebear/jekyll-theme-editorial"
|
10
|
+
link_title: "Visit the Editorial theme Github repo"
|
11
|
+
button_text: "Github Repo"
|
12
12
|
images:
|
13
13
|
banner:
|
14
14
|
file: "pic10.jpg"
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
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.2
|
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-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.8.7
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '5.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.8.7
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '5.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: jekyll-feed
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|