jekyll-theme-so-simple 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,1145 +1,1144 @@
1
- # [So Simple Jekyll Theme][1]
2
-
3
- [![Gem](https://img.shields.io/gem/v/so-simple-theme.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-so-simple)
4
- [![license](https://img.shields.io/github/license/mmistakes/so-simple-theme.svg?style=flat-square)](LICENSE)
5
-
6
- So Simple is a simple [Jekyll theme](https://jekyllrb.com/docs/themes/) for your words and pictures. Built to provide:
7
-
8
- * A variety of layouts with clean and readable typography.
9
- * [Microformats](http://microformats.org/wiki/microformats2) markup to make post content machine-readable and discoverable.
10
- * Disqus Comments and Google Analytics support.
11
- * SEO best practices via [Jekyll SEO Tag][jekyll-seo-tag].
12
- * Options to customize the theme and make it your own.
13
-
14
- :sparkles: **See what's new in the [CHANGELOG](CHANGELOG.md).**
15
-
16
- [![So Simple live preview][2]][1]
17
-
18
- ![So Simple layouts](screenshots.jpg)
19
-
20
- [1]: https://mmistakes.github.io/so-simple-theme/
21
- [2]: screenshot.png "site preview"
22
-
23
- ## Table of Contents
24
-
25
- 1. [Installation](#installation)
26
- 1. [Ruby Gem Method](#ruby-gem-method)
27
- 2. [GitHub Pages Method](#github-pages-method)
28
- 1. [Remove the Unnecessary](#remove-the-unnecessary)
29
- 2. [Upgrading](#upgrading)
30
- 1. [Ruby Gem](#ruby-gem)
31
- 2. [Remote Theme](#remote-theme)
32
- 3. [Use Git](#use-git)
33
- 4. [Update Files Manually](#update-files-manually)
34
- 3. [Structure](#structure)
35
- 1. [Starting Fresh](#starting-fresh)
36
- 2. [Starting from `jekyll new`](#starting-from-jekyll-new)
37
- 4. [Configuring](#configuring)
38
- 1. [Site Locale](#site-locale)
39
- 2. [Site URL](#site-url)
40
- 3. [Site Base URL](#site-base-url)
41
- 4. [Date Format](#date-format)
42
- 5. [Reading Time](#reading-time)
43
- 6. [Mathematics](#mathematics)
44
- 7. [Google Fonts](#google-fonts)
45
- 8. [Pagination](#pagination)
46
- 9. [Search](#search)
47
- 10. [Taxonomy Pages](#taxonomy-pages)
48
- 11. [Comments (via Disqus)](#comments-via-disqus)
49
- 12. [Google Analytics](#google-analytics)
50
- 13. [Other](#other)
51
- 5. [Layouts](#layouts)
52
- 1. [`layout: default`](#layout-default)
53
- 2. [`layout: post`](#layout-post)
54
- 3. [`layout: page`](#layout-page)
55
- 4. [`layout: home`](#layout-home)
56
- 5. [`layout: posts`](#layout-posts)
57
- 6. [`layout: categories`](#layout-categories)
58
- 7. [`layout: tags`](#layout-tags)
59
- 8. [`layout: collection`](#layout-collection)
60
- 9. [`layout: category`](#layout-category)
61
- 10. [`layout: tag`](#layout-tag)
62
- 11. [`layout: search`](#layout-search)
63
- 6. [Images](#images)
64
- 7. [Theme Text](#theme-text)
65
- 8. [Navigation](#navigation)
66
- 9. [Author](#author)
67
- 10. [Footer](#footer)
68
- 1. [Footer Links](#footer-links)
69
- 2. [Copyright Text](#copyright-text)
70
- 11. [Helpers](#helpers)
71
- 1. [Responsive Embed](#responsive-embed)
72
- 2. [Table of Contents](#table-of-contents)
73
- 12. [Migration Guide](#migration-guide)
74
- 1. [Global Changes](#global-changes)
75
- 2. [Browser Support](#browser-support)
76
- 3. [Configuration Changes](#configuration-changes)
77
- 1. [Locale Changes](#locale-changes)
78
- 2. [Owner Changes](#owner-changes)
79
- 3. [Google Analytics Changes](#google-analytics-changes)
80
- 4. [Disqus Comments Changes](#disqus-comments-changes)
81
- 4. [Search Changes](#search-changes)
82
- 5. [Image Changes](#image-changes)
83
- 6. [Development Changes](#development-changes)
84
- 7. [Step-by-Step](#step-by-step)
85
- 13. [Customization](#customization)
86
- 1. [Overriding Includes and Layouts](#overriding-includes-and-layouts)
87
- 2. [Customizing Sass (SCSS)](#customizing-sass-scss)
88
- 3. [Customizing JavaScript](#customizing-javascript)
89
- 14. [Font Awesome Icons](#font-awesome-icons)
90
- 15. [Development](#development)
91
- 1. [JavaScript Build Script](#javascript-build-script)
92
- 16. [Contributing](#contributing)
93
- 17. [Credits](#credits)
94
- 18. [License](#license)
95
-
96
- ## Installation
97
-
98
- If you're running Jekyll v3.5+ and self-hosting you can quickly install the theme as a Ruby gem. If you're hosting with [**GitHub Pages**](https://pages.github.com/) you can install as a [remote theme](https://github.com/benbalter/jekyll-remote-theme) or directly copy all of the theme files (see [structure](#structure) below) into your project.
99
-
100
- ### Ruby Gem Method
101
-
102
- 1. Add this line to your Jekyll site's `Gemfile` (or [create one](example/Gemfile)):
103
-
104
- ```ruby
105
- gem "jekyll-theme-so-simple"
106
- ```
107
-
108
- 2. Add this line to your Jekyll site's `_config.yml` file:
109
-
110
- ```yaml
111
- theme: jekyll-theme-so-simple
112
- ```
113
-
114
- 3. Then run [Bundler](http://bundler.io/) to install the theme gem and dependencies:
115
-
116
- ```terminal
117
- bundle install
118
- ```
119
-
120
- ### GitHub Pages Method
121
-
122
- GitHub Pages has added [full support](https://github.com/blog/2464-use-any-theme-with-github-pages) for any GitHub-hosted theme.
123
-
124
- 1. Replace `gem "jekyll"` with:
125
-
126
- ```ruby
127
- gem "github-pages", group: :jekyll_plugins
128
- ```
129
-
130
- 2. Run `bundle update` and verify that all gems install properly.
131
-
132
- 3. Add `remote_theme: "mmistakes/jekyll-theme-so-simple"` to your
133
- `_config.yml` file. Remove any other `theme:` or `remote_theme:` entries.
134
-
135
- ---
136
-
137
- **Note:** Your Jekyll site should be viewable immediately at <http://USERNAME.github.io>. If it's not, you can force a rebuild by pushing empty commits to GitHub (see below for more details).
138
-
139
- If you're hosting several Jekyll based sites under the same GitHub username you will have to use Project Pages instead of User Pages. Essentially you rename the repo to something other than **USERNAME.github.io** and create a `gh-pages` branch off of `master`. For more details on how this works, check [GitHub's documentation](https://help.github.com/articles/user-organization-and-project-pages/).
140
-
141
- #### Remove the Unnecessary
142
-
143
- If you forked or downloaded the [`so-simple-theme` repo](https://github.com/mmistakes/so-simple-theme) you can safely remove the following files and folders:
144
-
145
- * `docs/*`
146
- * `example/*`
147
- * `.editorconfig`
148
- * `.gitattributes`
149
- * `CHANGELOG.md`
150
- * `Gemfile`
151
- * `jekyll-theme-so-simple.gemspec`
152
- * `Rakefile`
153
- * `README.md`
154
- * `screenshot.png`
155
-
156
- ## Upgrading
157
-
158
- If you're using the Ruby Gem or remote theme versions of So Simple, upgrading is fairly painless.
159
-
160
- To check which version you are currently using, view the source of your built site and you should something similar to:
161
-
162
- ```
163
- <!--
164
- So Simple Jekyll Theme 3.0.0
165
- Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes
166
- Free for personal and commercial use under the MIT license
167
- https://github.com/mmistakes/so-simple-theme/blob/master/LICENSE
168
- -->
169
- ```
170
-
171
- This will be at the top of every `.html` file, `/assets/css/main.css`, and `/assets/js/main.js`.
172
-
173
- ### Ruby Gem
174
-
175
- Simply run `bundle update` if you're using Bundler (have a `Gemfile`) or `gem update jekyll-theme-so-simple` if you're not.
176
-
177
- ### Remote Theme
178
-
179
- When hosting with [GitHub Pages](https://pages.github.com/) you'll need to push up a commit to force a rebuild with the latest [theme release](https://github.com/mmistakes/so-simple-theme/releases).
180
-
181
- An empty commit will get the job done too if you don't have anything to push at the moment:
182
-
183
- ```terminal
184
- git commit --allow-empty -m "Force rebuild of site"
185
- ```
186
-
187
- ### Use Git
188
-
189
- If you want to get the most out of the Jekyll + GitHub Pages workflow, then you'll need to utilize Git. To pull down theme updates manually you must first ensure there's an upstream remote. If you forked the theme's repo then you're likely good to go.
190
-
191
- To double check, run `git remote -v` and verify that you can fetch from `origin https://github.com/mmistakes/so-simple-theme.git`.
192
-
193
- To add it you can do the following:
194
-
195
- ```terminal
196
- git remote add upstream https://github.com/mmistakes/so-simple-theme.git
197
- ```
198
-
199
- #### Pull Down Updates
200
-
201
- Now you can pull any commits made to theme's `master` branch with:
202
-
203
- ```terminal
204
- git pull upstream master
205
- ```
206
-
207
- Depending on the amount of customizations you've made after forking, there's likely to be merge conflicts. Work through any conflicting files Git flags, staging the changes you wish to keep, and then commit them.
208
-
209
- ### Update Files Manually
210
-
211
- Another way of dealing with updates is [downloading the theme](https://github.com/mmistakes/so-simple-theme/archive/master.zip) --- replacing your layouts, includes, and assets with the newer ones manually. To be sure that you don't miss any changes review the theme's [commit history](https://github.com/mmistakes/so-simple-theme/commits/master) to see what has changed.
212
-
213
- Here's a quick checklist of the important folders/files you'll want to be mindful of:
214
-
215
- | Name | |
216
- | ---------------------- | ------------------------------------------------------------------------------ |
217
- | `_layouts` | Replace all. Apply edits if you customized any layouts. |
218
- | `_includes` | Replace all. Apply edits if you customized any includes. |
219
- | `assets` | Replace all. Apply edits if you customized stylesheets or scripts. |
220
- | `_sass` | Replace all. Apply edits if you customized Sass partials. |
221
- | `_data/navigation.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
222
- | `_data/text.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
223
- | `_config.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
224
-
225
- ---
226
-
227
- **Note:** If you're not seeing the latest version, be sure to flush browser and CDN caches. Depending on your hosting environment older versions of `/assets/css/main.css`, `/assets/js/main.min.js`, or `*.html` files may be cached.
228
-
229
- ## Structure
230
-
231
- Layouts, includes, Sass partials, and data files are all placed in their default locations. Stylesheets and scripts can be found in `assets`, and a few development related files in the project's root directory.
232
-
233
- **Please note:** If you installed So Simple via the Ruby Gem or remote theme methods, theme files found in `/_layouts`, `/_includes`, `/_sass`, and `/assets` will be missing from your project. This is normal as they are bundled with the [`jekyll-theme-so-simple`](https://rubygems.org/gems/jekyll-theme-so-simple) gem.
234
-
235
- ```
236
- ├── _data # data files
237
- | └── text.yml # theme text
238
- ├── _includes # theme includes
239
- ├── _layouts # theme layouts (see below for usage)
240
- ├── _sass # Sass partials
241
- ├── assets
242
- | ├── css
243
- | | └── main.scss
244
- | └── js
245
- | └── main.min.js
246
- ├── _config.yml # sample configuration
247
- └── index.md # sample home page (recent posts/not paginated)
248
- ```
249
-
250
- ### Starting Fresh
251
-
252
- After creating a `Gemfile` and installing the theme you'll need to add and edit the following files:
253
-
254
- * [`_config.yml`](_config.yml)
255
- * [`/_data/text.yml`](_data/text.yml)
256
- * [`index.md`](index.md)
257
-
258
- **Note:** Consult the [**pagination**](#pagination) documentation below for instructions on how to enable it on the home page.
259
-
260
- ### Starting from `jekyll new`
261
-
262
- Using the `jekyll new` command will get you up and running the quickest.
263
-
264
- Edit your `Gemfile` and `_config.yml` files following the [installation guide](#installation) above and [configuration guide](#configuring) below, then create `_data/text.yml` as instructed earlier.
265
-
266
- ## Configuring
267
-
268
- Configuration of site-wide elements (`locale`, `title`, `description`, `url`, `logo`, `author`, etc.) happens in your project's `_config.yml`. See the [example configuration](example/_config.yml) in this repo for additional reference.
269
-
270
- | Name | Description | Example |
271
- | ------------- | ------------------------------------------------------------------------ | ----------------------------------- |
272
- | `locale` | Primary language for the site. | `"en-us"` |
273
- | `title` | Site's title. | `"My Awesome Site"` |
274
- | `description` | A short description. | `"This is my site, it is awesome."` |
275
- | `baseurl` | Used to test the website under the same base url it will be deployed to. | `/my-base-path` |
276
- | `url` | The full URL to your site. | `"https://your-site.com"` |
277
- | `logo` | Path to a site-wide logo used in masthead. | `/images/your-logo.png` |
278
-
279
- ### Site Locale
280
-
281
- **`site.locale`** is used to declare the primary language for each web page within the site.
282
-
283
- _Example:_ locale: `"en-US"` sets the lang attribute for the site to the United States flavor of English, while `en-GB` would be for the United Kingdom style of English. Country codes are optional and the shorter variation `locale: "en"` is also acceptable. To find your language and country codes check this [reference table](<https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx>).
284
-
285
- Properly setting the locale is important for associating localized text found in the text data file.
286
-
287
- **Note:** The theme defaults to text in English (`en`, `en-US`, `en-GB`). If you change locale in `_config.yml` to something else be sure to add the corresponding locale key and translated text to [`_data/text.yml`](_data/text.yml).
288
-
289
- ### Site URL
290
-
291
- The base hostname and protocol for your site. If you're hosting with GitHub Pages this will be something like `url: "https://github.io.mmistakes"` or `url: "https://your-site.com"` if you have a custom domain name.
292
-
293
- GitHub Pages now [forces `https://` for new sites](https://help.github.com/articles/securing-your-github-pages-site-with-https/), so be mindful of that when setting your URL to avoid mixed-content warnings.
294
-
295
- **Note:** Jekyll overrides the value of `url` with `http://localhost:4000` when running `jekyll serve` locally in development. If you want to avoid this behavior set `JEKYLL_ENV=production` to [force the environment](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time) to production.
296
-
297
- ### Site Base URL
298
-
299
- This option causes all kinds of confusion in the Jekyll community. If you're not hosting your site as a [GitHub Project Page](https://help.github.com/articles/user-organization-and-project-pages/) or in a subfolder (e.g., `/blog`), then don't mess with it.
300
-
301
- In the case of the **So Simple** demo site it's hosted on GitHub at <https://mmistakes.github.io/so-simple-theme>. To correctly set this base path I'd use `url: "https://mmistakes.github.io"` and `baseurl: "/so-simple-theme"`.
302
-
303
- For more information on how to properly use `site.url` and `site.baseurl` as intended by the Jekyll maintainers, check [Parker Moore's post on the subject](https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/).
304
-
305
- **Note:** When using `baseurl` remember to include it as part of your link and asset paths in your content. Values of `url:` and `baseurl: "/blog"` would make your local site visible at <http://localhost:4000/blog> and not <http://localhost:4000>. You can either prepend all your asset and internal link paths with `{{ site.baseurl }}` or use Jekyll's `relative_url`.
306
-
307
- To use the example values above the following image path of `{{ '/images/my-image.jpg' | relative_url }}` would output correctly as `http://localhost:4000/blog/images/my-image.jpg`.
308
-
309
- Without the `relative_url` filter that asset path would be missing `/blog` and you'd have a broken image on your page.
310
-
311
- ### Date Format
312
-
313
- You can change the default date format by specifying `date_format` in `_config.yml`. It accepts any of the standard [Liquid date formats](http://shopify.github.io/liquid/filters/date/).
314
-
315
- For example the default value of `"%B %-d, %Y"` could be changed like so:
316
-
317
- ```yaml
318
- date_format: "%Y-%m-%d"
319
- ```
320
-
321
- ### Reading Time
322
-
323
- Enable estimated reading time snippets site-wide with `read_time: true`. **`200`** has been set as the default words per minute value — which can be changed via `words_per_minute` in your `_config.yml` file.
324
-
325
- ```yaml
326
- read_time: true
327
- words_per_minute: 200
328
- ```
329
-
330
- ### Mathematics
331
-
332
- Enable [**MathJax**](https://www.mathjax.org) (a JavaScript display engine for mathematics) site-wide with `mathjax: true`.
333
-
334
- ### Google Fonts
335
-
336
- Easily use [**Google Fonts**](https://fonts.google.com/) throughout your site by replacing the font `name` and `weights` accordingly. Suggested font pairings are as follows:
337
-
338
- ```yaml
339
- google_fonts:
340
- - name: "Source Sans Pro"
341
- weights: "400,400i,700,700i"
342
- - name: "Lora"
343
- weights: "400,400i,700,700i"
344
- ```
345
-
346
- **Note:** If other font families are used, be sure to add, then override the following SCSS variables in `/assets/css/main.scss` with the `font-family` values Google provides.
347
-
348
- ```scss
349
- $serif-font-family: "Lora", serif;
350
- $sans-serif-font-family: "Source Sans Pro", sans-serif;
351
- $monospace-font-family: Menlo, Consolas, Monaco, "Courier New", Courier,
352
- monospace;
353
-
354
- $base-font-family: $sans-serif-font-family;
355
- $headline-font-family: $sans-serif-font-family;
356
- $title-font-family: $serif-font-family;
357
- $description-font-family: $serif-font-family;
358
- $meta-font-family: $serif-font-family;
359
- ```
360
-
361
- See [stylesheet documentation](#customizing-sass-scss) below for more information on overriding the theme's default variables.
362
-
363
- ### Pagination
364
-
365
- Break up the main listing of posts on the home page across multiple pages by [enabling pagination](http://jekyllrb.com/docs/pagination/).
366
-
367
- 1. Include the [`jekyll-paginate`][jekyll-paginate] plugin in your `Gemfile`.
368
-
369
- ```ruby
370
- group :jekyll_plugins do
371
- gem "jekyll-paginate"
372
- end
373
- ```
374
-
375
- 2. Add `jekyll-paginate` to the `plugins` array (previously `gems`) in your `_config.yml` file and the following pagination settings:
376
-
377
- ```yaml
378
- paginate: 10 # amount of posts to show per page
379
- paginate_path: /page:num/
380
- ```
381
-
382
- 3. Create `index.html` (or rename `index.md`) in the root of your project and add the following front matter:
383
-
384
- ```yaml
385
- layout: home
386
- paginate: true
387
- ```
388
-
389
- ### Search
390
-
391
- To index the full content of your documents for use in a [search page](#layout-search), set `search_full_content` to `true` in `_config.yml`:
392
-
393
- ```yaml
394
- search_full_content: true
395
- ```
396
-
397
- **Note:** Large amounts of posts will increase the size of the search index, impacting page load performance. Setting `search_full_content` to `false` (the default) restricts indexing to the first 50 words of body content.
398
-
399
- ### Taxonomy Pages
400
-
401
- By default, category and tags added to a post are not linked to taxonomy archive pages. To enable this behavior and link to pages with posts grouped by category or tag, add the following:
402
-
403
- ```yaml
404
- category_archive_path: "/categories/#"
405
- tag_archive_path: "/tags/#"
406
- ```
407
-
408
- These paths should mimic the permalinks used for your [**categories**](#layout-categories) and [**tags archive**](#layout-tags) pages. The `#` at the end is necessary to target the correct taxonomy section on the pages.
409
-
410
- For example if you were to create `categories.md` with the following front matter:
411
-
412
- ```yaml
413
- title: Categories Archive
414
- layout: categories
415
- permalink: /foo/
416
- ```
417
-
418
- You'd need to change `category_archive_path` to `"/foo/#` for category links to function properly.
419
-
420
- **Note:** You can create dedicated category and tag pages manually with [`layout: category`](#layout-category) and [`layout: tag`](#layout-tag). Or use plugins like [**jekyll-archives**][jekyll-archives] or [**jekyll-paginate-v2**](https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-AUTOPAGES.md) to generate them automatically.
421
-
422
- ### Comments (via Disqus)
423
-
424
- If you have a [**Disqus**](https://disqus.com/) account, you can show a comments section below each post.
425
-
426
- To enable Disqus comments, add your [Disqus shortname](https://help.disqus.com/customer/portal/articles/466208) to your project's `_config.yml` file:
427
-
428
- ```yaml
429
- disqus:
430
- shortname: my_disqus_shortname
431
- ```
432
-
433
- Comments only appear in production when built with the following [environment value](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time): `JEKYLL_ENV=production` to avoid polluting your Disqus account with `localhost` content.
434
-
435
- If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's front matter.
436
-
437
- ### Google Analytics
438
-
439
- To enable [**Google Analytics**](https://analytics.google.com/analytics/web/), add your tracking ID to `_config.yml` like so:
440
-
441
- ```yaml
442
- google_analytics: UA-NNNNNNNN-N
443
- ```
444
-
445
- Similar to Disqus comments above, the Google Analytics tracking script will only appear in production when using the following environment value: `JEKYLL_ENV=production`.
446
-
447
- ### Other
448
-
449
- For more configuration options be sure to consult the documentation for:
450
- [**jekyll-seo-tag**][jekyll-seo-tag], [**jekyll-feed**][jekyll-feed],
451
- [**jekyll-paginate**][jekyll-paginate], and [**jekyll-sitemap**][jekyll-sitemap].
452
-
453
- ---
454
-
455
- ## Layouts
456
-
457
- This theme provides the following layouts, which you can use by setting the `layout` [front matter](https://jekyllrb.com/docs/frontmatter/) on each page, like so:
458
-
459
- ```yaml
460
- ---
461
- layout: name
462
- ---
463
- ```
464
-
465
- ### `layout: default`
466
-
467
- This layout handles all of the basic page scaffolding placing the page content between the masthead and footer elements. All other layouts inherit this one and provide additional styling and features inside of the `{{ content }}` block.
468
-
469
- ### `layout: post`
470
-
471
- This layout accommodates the following front matter:
472
-
473
- | Name | Type | Description |
474
- | ---- | ----- | ---------- |
475
- | `image` | String | Path to a large image associated with the post. Also used for [OpenGraph](http://ogp.me/), [Twitter Cards](https://dev.twitter.com/cards), and site feed thumbnail if enabled. [Suggested image sizes](#images). |
476
- | `image.path` | String | Same as above. Used when a `thumbnail` or `caption` needs to be assigned to the `image` object as well. |
477
- | `image.caption` | String | Describes the image or provides credit. Markdown is allowed. |
478
- | `author` | Object or string | Specify a post's author `name`, `picture`, `twitter`, `links`, etc. |
479
- | `comments` | Boolean | Disable comments with `comments: false`. |
480
- | `share` | Boolean | Add social share links to a post with `share: true`. |
481
-
482
- **Post image example:**
483
-
484
- ```yaml
485
- image:
486
- path: /images/post-image-lg.jpg
487
- thumbnail: /images/post-image-th.jpg
488
- caption: "Photo credit [Unsplash](https://unsplash.com/)
489
- ```
490
-
491
- **Note:** `image.feature` front matter has been deprecated, to fully support [jekyll-seo-tag][jekyll-seo-tag]. If you are not using `thumbnail` or `caption` the post image can be assigned more concisely as `image: /images/your-post-image.jpg`.
492
-
493
- **Post author example:**
494
-
495
- ```yaml
496
- # post specific author data if different from what is set in _config.yml
497
- author:
498
- name: John Doe
499
- picture: /images/john-doe.jpg
500
- twitter: johndoe
501
- ```
502
-
503
- **Note:** Author information can centralized in `_data/authors.yml` by doing following in the document's front matter:
504
-
505
- ```yaml
506
- author: johndoe
507
- ```
508
-
509
- With the corresponding author key in `_data/authors.yml`:
510
-
511
- ```yaml
512
- johndoe:
513
- name: John Doe
514
- picture: /images/john-doe.jpg
515
- twitter: johndoe
516
- ```
517
-
518
- **Note:** `author.picture` recommended size is `150 x 150` pixels.
519
-
520
- #### Author Links
521
-
522
- To define what links appear in the author sidebar use the `authors.links` key in either `_config.yml` or `/_data/authors.yml`.
523
-
524
- | Name | Description |
525
- | ------- | ---------------------------------------------------------------------------------------------------------------- |
526
- | `title` | Describes the link. Not visible, used for accessibility purposes. |
527
- | `url` | URL the link points to. |
528
- | `icon` | Corresponds with a [Font Awesome icon](https://fontawesome.com/icons?d=gallery) e.g., `fab fa-twitter-square`. |
529
-
530
- **Example:**
531
-
532
- ```yaml
533
- author:
534
- links:
535
- - title: Twitter
536
- url: https://twitter.com/username
537
- icon: fab fa-twitter-square
538
- - title: Instagram
539
- url: https://instagram.com/username
540
- icon: fab fa-instagram
541
- - title: GitHub
542
- url: https://github.com/username
543
- icon: fab fa-github-square
544
- ```
545
-
546
- ### `layout: page`
547
-
548
- Visually this layout looks and acts similar `layout: post`, with the following
549
- differences.
550
-
551
- * Author sidebar and page meta (published date, categories, and tags) are ommitted.
552
- * Page is less wide due to omitted sidebar.
553
- * Disqus comments are omitted.
554
- * Next/Previous post navigation links omitted.
555
-
556
- The page layout forms the base for several other layouts like [`home`](#layout-home), [`posts`](#layout-posts), [`categories`](#layout-categories), [`tags`](#layout-tags), [`collection`](#layout-collection), [`category`](#layout-category), [`tag`](#layout-tag), and [`search`](#layout-search).
557
-
558
- ### `layout: home`
559
-
560
- This layout accommodates the same front matter as `layout: page`, with the
561
- addition of the following:
562
-
563
- ```yaml
564
- paginate: true # enables pagination loop, see section above for additional setup
565
- entries_layout: # list (default), grid
566
- ```
567
-
568
- When not enabled the page defaults to showing the latest 10 posts. To change the amount of posts shown, you can edit or override the `limit` value in [`/_includes/posts-limit.html`](_includes/posts-limit.html).
569
-
570
- ```liquid
571
- {% for entry in site.posts limit: 10 %}
572
- {% include entry.html %}
573
- {% endfor %}
574
- ```
575
-
576
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
577
-
578
- ### `layout: posts`
579
-
580
- This layout displays all posts grouped by the year they were published. It accommodates the same front matter as `layout: page`.
581
-
582
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
583
-
584
- ### `layout: categories`
585
-
586
- This layout displays all posts grouped category. It accommodates the same front matter as `layout: page`.
587
-
588
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
589
-
590
- ### `layout: tags`
591
-
592
- This layout displays all posts grouped by tag. It accommodates the same front matter as `layout: page`.
593
-
594
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
595
-
596
- ### `layout: collection`
597
-
598
- This layout displays all documents grouped by a specific collection. It accommodates the same front matter as `layout: page` with the addition of the following:
599
-
600
- ```yaml
601
- collection: # collection name
602
- entries_layout: # list (default), grid
603
- ```
604
-
605
- To create a page showing all documents in the `recipes` collection you'd create `recipes.md` in the root of your project and add this front matter:
606
-
607
- ```yaml
608
- title: Recipes
609
- layout: collection
610
- permalink: /recipes/
611
- collection: recipes
612
- ```
613
-
614
- By default, documents are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
615
-
616
- ### `layout: category`
617
-
618
- This layout displays all posts grouped by a specific category. It accommodates the same front matter as `layout: page` with the addition of the following:
619
-
620
- ```yaml
621
- taxonomy: # category name
622
- entries_layout: # list (default), grid
623
- ```
624
-
625
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
626
-
627
- To create a page showing all posts assigned to the category `foo` you'd create `foo.md` in the root of your project and add this front matter:
628
-
629
- ```yaml
630
- title: Foo
631
- layout: category
632
- permalink: /categories/foo/
633
- taxonomy: foo
634
- ```
635
-
636
- ### `layout: tag`
637
-
638
- This layout displays all posts grouped by a specific tag. It accommodates the same front matter as `layout: page` with the addition of the following:
639
-
640
- ```yaml
641
- taxonomy: # tag name
642
- entries_layout: # list (default), grid
643
- ```
644
-
645
- By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
646
-
647
- To create a page showing all posts assigned to the tag `foo bar` you'd create `foo-bar.md` in the root of your project and add this front matter:
648
-
649
- ```yaml
650
- title: Foo Bar
651
- layout: tag
652
- permalink: /tags/foo-bar/
653
- taxonomy: foo bar
654
- ```
655
-
656
- ### `layout: search`
657
-
658
- This layout displays a search form and displays related pages based on the query.
659
-
660
- Page content index: `title`, `excerpt`, `content` (when enabled), `categories`, `tags`, and `url`.
661
-
662
- If you would like to exclude specific pages/posts from the search index set the search flag to `false` in their front matter.
663
-
664
- ```yaml
665
- search: false
666
- ```
667
-
668
- To index the full content of your documents set `search_full_content` to `true` in `_config.yml`:
669
-
670
- ```yaml
671
- search_full_content: true
672
- ```
673
-
674
- **Note:** Large amounts of posts will increase the size of the search index, impacting page load performance. Setting `search_full_content` to `false` (the default) restricts indexing to the first 50 words of body content.
675
-
676
- ## Images
677
-
678
- Suggested image sizes in pixels are as follows:
679
-
680
- | Image | Description | Size |
681
- | ----- | ----------- | ---- |
682
- | `site.logo` | Site-wide logo used in masthead. | `200 x 200` |
683
- | `page.image.path` | Large full-width document image. | Tall images will push content down the page. `1600 x 600` is a good middle-ground size to aim for. |
684
- | `page.image` | Short-hand for `page.image.path` when used alone (without `thumbnail`, `caption`, or other variables). | Same as `page.image.path` |
685
- | `page.image.thumbnail` | Small document image used in grid view. | `400 x 200` |
686
- | `author.picture` | Author picture in post sidebar. | `150 x 150` |
687
-
688
- ## Theme Text
689
-
690
- To change text found throughout the theme, copy the following
691
- [`/_data/theme.yml`](_data/text.yml) file and customize as necessary.
692
-
693
- When adding new texts be sure the keys match these [language/country codes](<https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx>), that may be used for [`site.locale`](#site-locale).
694
-
695
- ## Navigation
696
-
697
- To define what pages are linked in the top navigation:
698
-
699
- 1. Create a [`/_data/navigation.yml`](_data/navigation.yml) file.
700
-
701
- 2. Add pages in the order you'd like them to appear:
702
-
703
- ```yaml
704
- - title: Posts
705
- url: /posts/
706
- - title: Categories
707
- url: /categories/
708
- - title: External Page
709
- url: https://whatever-site.com/page.html
710
- - title: Search
711
- url: /search/
712
- ```
713
-
714
- **Note:** Long titles or many links may cause the navigation bar to break into multiple lines, especially on smaller screens. Keep this in mind as you develop your site's primary navigation.
715
-
716
- ## Author
717
-
718
- Author information is used as meta data for post "by lines" and propagates the `creator` field of Twitter summary cards with the following front matter in `_config.yml`:
719
-
720
- ```yaml
721
- author:
722
- name: John Doe
723
- twitter: johndoetwitter
724
- picture: /images/johndoe.png
725
- ```
726
-
727
- Site-wide author information can be overridden in a document's front matter in the same way:
728
-
729
- ```yaml
730
- author:
731
- name: Jane Doe
732
- twitter: janedoetwitter
733
- picture: /images/janedoe.png
734
- ```
735
-
736
- Or by specifying a corresponding key in the document's front matter, that exists in `site.data.authors`. E.g., you have the following in the document's front matter:
737
-
738
- ```yaml
739
- author: megaman
740
- ```
741
-
742
- And you have the following in `_data/authors.yml`:
743
-
744
- ```yaml
745
- megaman:
746
- name: Mega Man
747
- twitter: megamantwitter
748
- picture: /images/megaman.png
749
-
750
- drlight:
751
- name: Dr. Light
752
- twitter: drlighttwitter
753
- picture: /images/drlight.png
754
- ```
755
-
756
- Currently `author.picture` is only used in `layout: post`. Recommended size is `150 x 150` pixels.
757
-
758
- ## Footer
759
-
760
- The footer links and copyright text can both be customized.
761
-
762
- ### Footer Links
763
-
764
- Footer links are set in `_config.yml` under the `footer_links` key.
765
-
766
- | Name | Description |
767
- | ------- | ---------------------------------------------------------------------------------------------------------------- |
768
- | `title` | Describes the link. Not visible, used for accessibility purposes. |
769
- | `url` | URL the link points to. |
770
- | `icon` | Corresponds with a [Font Awesome 5 icon](https://fontawesome.com/icons?d=gallery) e.g., `fab fa-twitter-square`. |
771
-
772
- **Examples:**
773
-
774
- ```yaml
775
- footer_links:
776
- - title: Twitter
777
- url: https://twitter.com/username
778
- icon: fab fa-twitter-square
779
- - title: GitHub
780
- url: https://github.com/mmistakes
781
- icon: fab fa-github-square
782
- - title: Feed
783
- url: atom.xml
784
- icon: fas fa-rss-square
785
- ```
786
-
787
- ### Copyright Text
788
-
789
- By default the copyright inserts the current year, [`site.title`](#site-title), and the words `"Powered by Jekyll & So Simple."` To change this add `copyright` to your `_config.yml` like so (Markdown is allowed):
790
-
791
- ```yaml
792
- copyright: "This site is made with <3 by *me, myself, and I*."
793
- ```
794
-
795
- ## Helpers
796
-
797
- You can think of these Jekyll helpers as shortcodes. Since GitHub Pages doesn't allow most plugins --- [custom tags](https://jekyllrb.com/docs/plugins/#tags) are out. Instead the theme leverages [**includes**](https://jekyllrb.com/docs/templates/#includes) to do something similar.
798
-
799
- ### Responsive Embed
800
-
801
- Embed a video from YouTube/Vimeo or any other `iframe` content that responsively sizes to fit the width of its parent.
802
-
803
- | Parameter | Required | Description |
804
- | --------- | -------- | ----------- |
805
- | `url` | Yes | Video or iframe's URL e.g., `https://www.youtube.com/watch?v=-PVofD2A9t8` |
806
- | `ratio` | Optional | Ratio of the video or iframe content. `21:9`, `16:9`, `4:3`, `1:1`. If a ratio is not assigned `16:9` is used. |
807
-
808
- **Example:**
809
-
810
- ```html
811
- {% include responsive-embed url="https://www.youtube.com/watch?v=-PVofD2A9t8" ratio="16:9" %}
812
- ```
813
-
814
- ### Table of Contents
815
-
816
- To include an [auto-generated table of contents](https://kramdown.gettalong.org/converter/html.html#toc) for posts and pages, add the following helper where you'd like it to appear.
817
-
818
- ```html
819
- {% include toc %}
820
- ```
821
-
822
- ## Migration Guide
823
-
824
- So Simple 3 is a major rewrite of the entire theme. The most notable changes are summarized below, followed by more specific changes.
825
-
826
- It is safe to say you'll probably want to ditch all `_layouts`, `_includes`, `_sass`, `.css`, and `.js` files from v2 and use either the [Ruby gem](#ruby-gem-method) or [remote theme](github-pages-method) installation options.
827
-
828
- ### Global Changes
829
-
830
- * "Fork method" has been deprecated in favor of installing/upgrading the theme via a gem or remote theme.
831
- * All `_layouts`, `_includes`, `_sass`, and JavaScript have been rebuilt.
832
- * Properly uses `site.url` and `site.baseurl` leveraging the `relative_url` and `absolute_url` filters.
833
- * Replaced custom `/_includes/open-graph.html` with [**jekyll-seo-tag**][jekyll-seo-tag].
834
- * Full control over links and icons used in author sidebar and footer.
835
- * Tag, articles, and blog starter pages have been replaced with new layouts ([`tags`](#layout-tags) and [`posts`](#layout-posts)) for easier use.
836
- * Removed `404.md` page.
837
- * Replaced custom `atom.xml` feed file with [**jekyll-feed**][jekyll-feed].
838
- * Removed default `favicon.ico` and `favicon.png` files.
839
- * Replaced simple JSON search with [**Lunr**](https://lunrjs.com/).
840
- * Replaced [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/) with [**Lity**](https://sorgalla.com/lity/).
841
- * Removed [FitVids.JS](http://fitvidsjs.com/).
842
-
843
- ### Browser Support
844
-
845
- * CSS written with modern browsers in mind. Where possible fallbacks for `float` based layouts have been used so things don't look *too broken* in browsers that don't support `display: grid` and flexbox.
846
-
847
- ### Configuration Changes
848
-
849
- #### Locale Changes
850
-
851
- Format has changed from `en_US` (with an underscore) to `en-US` with a hyphen.
852
-
853
- #### Owner Changes
854
-
855
- `site.owner` is now `site.author` to better support [jekyll-seo-tag][jekyll-seo-tag] and [jekyll-feed][jekyll-feed].
856
-
857
- | v2 | v3 |
858
- |-------------------------------|----------------------------------------------------------------|
859
- | `site.owner.name` | **`site.author.name`** |
860
- | `site.owner.avatar` | **`site.author.picture`** |
861
- | `site.owner.email` | **`site.author.email`** |
862
- | `site.owner.twitter` | **`site.twitter`** |
863
- | `site.owner.google.analytics` | **deprecated**, replaced with [jekyll-seo-tag][jekyll-seo-tag] |
864
- | `site.owner.bing-verify` | **deprecated**, replaced with [jekyll-seo-tag][jekyll-seo-tag] |
865
-
866
- #### Google Analytics Changes
867
-
868
- `site.owner.google.analytics` is now `site.google_analytics`. [See documentation](#google-analytics) for more information.
869
-
870
- #### Disqus Comments Changes
871
-
872
- `site.owner.disqus-shortname` is now `site.disqus.shortname`. [See documentation](#comments-via-disqus) more information.
873
-
874
- To disable comments on a particular post add `comments: false` to its front matter.
875
-
876
- ### Search Changes
877
-
878
- `search_omit` has been renamed to `search`. To exclude a post or page from search add `search: false` to its front matter instead.
879
-
880
- ### Image Changes
881
-
882
- When assigning image paths for things like the `site.logo`, `page.image.path`, `author.picture`, etc. they now require a full relative or absolute path.
883
-
884
- In So Simple v2 images were all placed in `/images/` and assigned in front matter with just the filename. For images to properly load, you now need to prepend all paths with `/images/`... if you are storing images there e.g., `/images/your-image.jpg`.
885
-
886
- To better support Jekyll plugin's like [jekyll-seo-tag][jekyll-seo-tag], [jekyll-feed][jekyll-feed], and [jekyll-sitemap][jekyll-sitemap] most of the `image` keys have been renamed. Adjust the front matter in all of your posts' and pages' accordingly.
887
-
888
- | v2 | v3 |
889
- |--------------------|--------------------------------------------|
890
- | `image.feature` | **`image.path`** |
891
- | `image.thumb` | **`image.thumbnail`** |
892
- | `image.credit` | **`image.caption`** (Markdown allowed) |
893
- | `image.creditlink` | deprecated use `**image.caption**` instead |
894
-
895
- A post with the following v2 front matter:
896
-
897
- ```yaml
898
- image:
899
- feature: feature-image-filename.jpg
900
- thumb: thumb-image-filename.jpg
901
- credit: Michael Rose
902
- creditlink: https://mademistakes.com
903
- ```
904
-
905
- Would be converted into the following v3 front matter:
906
-
907
- ```yaml
908
- image:
909
- path: /images/feature-image-filename.jpg
910
- thumbnail: /images/thumb-image-filename.jpg
911
- caption: "[Michael Rose](https://mademistakes)"
912
- ```
913
-
914
- ### Development Changes
915
-
916
- * Replaced Grunt tasks with [npm scripts](https://css-tricks.com/why-npm-scripts/).
917
-
918
- ### Step-by-Step
919
-
920
- Rough steps to migrate a stock So Simple v2 fork (with no alterations) to the latest.
921
-
922
- 1. Remove `_includes/`, `_layouts/`, `_sass/`, `jshintrc`, `Gruntfile.js`, and `search.json`.
923
- 2. Edit `Gemfile` for either the [Ruby gem](#ruby-gem-method) or [GitHub Pages](#github-pages-method) installation methods and follow those instructions.
924
- 3. Add the following Google Fonts to `_config.yml`:
925
-
926
- ```yaml
927
- google_fonts:
928
- - name: "Source Sans Pro"
929
- weights: "400,400i,700,700i"
930
- - name: "Lora"
931
- weights: "400,400i,700,700i"
932
- ```
933
-
934
- 4. Edit `_config.yml` paying close attention to those keys that [have been renamed](#configuration-changes) or have new relative path requirements. `locale`, `logo`, and `owner` are good places to start.
935
- 5. Rename all instances of `image.feature`, `image.thumb`, and `image.credit` in posts/pages adhering to the [image changes](#image-changes) above.
936
- 6. Remove the body content in `index.html` and change `layout: page` to `layout: home`. Configure [pagination](#pagination) if necessary.
937
- 7. Remove the body content in `/search/index.md` and change `layout: page` to **`layout: search`**.
938
- 8. Remove the body content in `/tags/index.md` and change `layout: page` to **`layout: tags`**.
939
- 9. Remove the body content in `/articles/index.md` and change `layout: page` to **`layout: category`** and add **`taxonomy: articles`**.
940
- 10. Remove the body content in `/body/index.md` and change `layout: page` to **`layout: category`** and add **`taxonomy: blog`**.
941
- 11. Rename `modified` front matter in posts/pages to **`last_modified_at`** for improved parity with plugins that support it.
942
- 12. Add `tag_archive_path: "/tags/#"` to `_config.yml` to activate tag links in post meta sidebar.
943
- 13. Rename `avatar` to **`picture`** in `_data/authors.yml` (and in any posts/pages front matter), and edit the paths adhering to the [image path changes](#image-changes) above.
944
-
945
- ---
946
-
947
- ## Customization
948
-
949
- When installing as a **Ruby gem** or **remote theme** the core theme files (`_layouts`, `_includes`, `_sass`, `assets`, etc.) will be absent from your project.
950
-
951
- The default structure, style, and scripts of this theme can be overridden and customized in the following two ways:
952
-
953
- ### Overriding Includes and Layouts
954
-
955
- Theme files can be [overridden](http://jekyllrb.com/docs/themes/#overriding-theme-defaults) by placing a file with the same name into your project's `_includes` or `_layouts` directory. For instance:
956
-
957
- * To add another social sharing button to [`_includes/social-share.html`](_includes/social-share.html), create an `_includes` directory in your project, copy `_includes/social-share.html` from So Simple's gem folder to `<your_project>/_includes` and edit that file.
958
-
959
- **ProTip:** to locate the theme's files on your computer run `bundle show jekyll-theme-so-simple`. This returns the location of the gem-based theme files.
960
-
961
- The theme comes with two files to help inject custom markup and content into predefined locations.
962
-
963
- | | Description |
964
- | --- | ----------- |
965
- | [`_includes/head-custom.html`](_includes/head-custom.html) | Inserted inside the `<head>` element for adding metadata, favicons, etc. |
966
- | [`_includes/footer-custom.html`](_includes/footer-custom.html) | Inserted inside the `<footer>` element before site scripts and copyright information. |
967
-
968
- ### Customizing Sass (SCSS)
969
-
970
- To override the default [Sass](http://sass-lang.com/guide) (located in theme's
971
- `_sass` directory), do one of the following:
972
-
973
- 1. Copy directly from the So Simple gem
974
-
975
- * Go to your local So Simple gem installation directory (run
976
- `bundle show jekyll-theme-so-simple` to get the path to it).
977
- * Copy the contents of `/assets/css/main.scss` from there to
978
- `<your_project>`.
979
- * Customize what you want inside `<your_project>/assets/stylesheets/main.scss`.
980
-
981
- 2. Copy from this repo.
982
-
983
- * Copy the contents of [assets/css/main.scss](assets/css/main.scss) to `<your_project>`.
984
- * Customize what you want inside `<your_project/assets/stylesheets/main.scss`.
985
-
986
- **Note:** To customize the actual Sass partials bundled
987
- in the gem, you will need to copy the complete contents of the `_sass` directory to `<your_project>`. Due to the way Jekyll currently imports these files it's all or nothing. Overriding a single Sass partial (or two) won't work like `_includes` and `_layouts`.
988
-
989
- To make basic tweaks to theme's style, Sass variables can be overridden by adding to `<your_project>/assets/stylesheets/main.scss`. For instance, to change the accent color used throughout the theme add the following after all `@import` lines:
990
-
991
- ```scss
992
- $accent-color: tomato;
993
- ```
994
-
995
- ### Customizing JavaScript
996
-
997
- To override the default JavaScript bundled in the theme, do one of the following:
998
-
999
- 1. Copy directly from the So Simple gem
1000
-
1001
- * Go to your local So Simple gem installation directory (run
1002
- `bundle show jekyll-theme-so-simple` to get the path to it).
1003
- * Copy the contents of `/assets/js/main.js` from there to
1004
- `<your_project>`.
1005
- * Customize what you want inside `<your_project>/assets/js/main.js`.
1006
-
1007
- 2. Copy from this repo.
1008
-
1009
- * Copy the contents of [`/assets/js/main.js`](assets/js/main.js)
1010
- to `<your_project>`.
1011
- * Customize what you want inside `<your_project>/assets/js/main.js`.
1012
-
1013
- The theme's [`/assets/js/main.min.js`](assets/js/main.min.js) file is built from jQuery plugins and other scripts found in [`/assets/js/`](assets/js).
1014
-
1015
- ```
1016
- ├── assets
1017
- | ├── js
1018
- | | ├── lunr # Lunr search plugin
1019
- | | | ├── lunr.xx.js # Lunr language plugins
1020
- | | | ├── ...
1021
- | | | ├── lunr.min.js
1022
- | | | └── lunr.stemmer.support.min.js
1023
- | | ├── plugins
1024
- | | | ├── jquery.smooth-scroll.min.js # make same-page links scroll smoothly
1025
- | | | ├── lity.min.js # responsive lightbox
1026
- | | | └── table-of-contents.js # table of contents toggle
1027
- | | ├── main.js # jQuery plugin settings and other scripts
1028
- | | ├── main.min.js # concatenated and minified scripts
1029
- | | ├── search-data.json # search index used by Lunr
1030
- ```
1031
-
1032
- To modify or add your own scripts, include them in `assets/js/main.js` and then rebuild using `npm run build:js`. [See below for more details](#javascript-build-script).
1033
-
1034
- If you add additional scripts to `/assets/js/plugins/` and would like them concatenated with the others, be sure to update the `uglify` script in [`package.json`](package.json). Same goes for scripts that you remove.
1035
-
1036
- You can also add scripts to the `<head>` or closing `</body>` elements by adding paths to the following arrays in `_config.yml`.
1037
-
1038
- **Example:**
1039
-
1040
- ```yaml
1041
- head_scripts:
1042
- - https://code.jquery.com/jquery-3.2.1.min.js
1043
- - /assets/js/your-custom-head-script.js
1044
- footer_scripts:
1045
- - /assets/js/your-custom-footer-script.js
1046
- ```
1047
-
1048
- **Note:** If you assign paths to `footer_scripts` the theme's `/assets/js/main.min.js` file will be deactivated. This script includes plugins and other scripts that will cease to function unless you specifically add them to the `footer_scripts` array.
1049
-
1050
- ## Font Awesome Icons
1051
-
1052
- The theme utilizes the [**Font Awesome** SVG with JS](https://fontawesome.com/) version for iconography. Prominent locations these icons appear are in the author sidebar and footer links.
1053
-
1054
- ---
1055
-
1056
- ## Development
1057
-
1058
- To set up your environment to develop this theme:
1059
-
1060
- 1. Clone this repo
1061
- 2. `cd` into `/example` and run `bundle install`.
1062
-
1063
- To test the theme locally as you make changes to it:
1064
-
1065
- 1. `cd` into the root folder of the repo (e.g. `jekyll-theme-so-simple`).
1066
- 2. Run `bundle exec rake preview` and open your browser to
1067
- `http://localhost:4000/example/`.
1068
-
1069
- This starts a Jekyll server using the theme's files and contents of the `example/` directory. As modifications are made, refresh your browser to see any changes.
1070
-
1071
- ### JavaScript Build Script
1072
-
1073
- In an effort to reduce dependencies a set of [npm scripts](https://css-tricks.com/why-npm-scripts/) are used to build `main.min.js` instead of task runners like [Gulp](http://gulpjs.com/) or [Grunt](http://gruntjs.com/). If those tools are more your style then by all means use them instead :wink:.
1074
-
1075
- To get started:
1076
-
1077
- 1. Install Node.js.
1078
- 2. `cd` to the root of your project.
1079
- 3. Install all of the dependencies by running npm install.
1080
-
1081
- **Note:** If you upgraded from a previous version of the theme be sure you copied over [`package.json`](package.json) prior to running `npm install`. You may also need to remove your `node_modules` directory as well.
1082
-
1083
- If all goes well, executing `npm run build:js` will compress/concatenate `main.js` and all plugin scripts into `/assets/js/main.min.js`.
1084
-
1085
- ## Contributing
1086
-
1087
- Found a typo in the documentation? Requesting a feature or
1088
- [bug fix][issues]? Search through the open and closed issues before [submitting an issue][new-issue] to avoid duplication.
1089
-
1090
- [Pull requests][using-pull-requests] are also appreciated. If this is your first time, it may be helpful to read up on the [GitHub Flow][github-flow].
1091
-
1092
- If your contribution adds or changes the theme's behavior, make sure to update the documentation and/or sample content. Documentation lives in README.md while sample posts, pages, and collections are in the [`docs`](docs) and [`example`](example) folders.
1093
-
1094
- [issues]: https://github.com/mmistakes/so-simple-theme/issues
1095
- [new-issue]: https://github.com/mmistakes/so-simple-theme/issues/new
1096
- [using-pull-requests]: https://help.github.com/articles/using-pull-requests/
1097
- [github-flow]: https://guides.github.com/introduction/flow/
1098
-
1099
- ### Pull Requests
1100
-
1101
- When submitting a pull request:
1102
-
1103
- 1. Clone the repo.
1104
- 2. Create a branch off of `master` and give it a meaningful name (e.g.
1105
- `my-awesome-new-feature`).
1106
- 3. Open a pull request on GitHub and describe what problem it solves.
1107
-
1108
- ---
1109
-
1110
- ## Credits
1111
-
1112
- ### Creator
1113
-
1114
- **Michael Rose**
1115
-
1116
- * <https://mademistakes.com>
1117
- * <https://twitter.com/mmistakes>
1118
- * <https://github.com/mmistakes>
1119
-
1120
- ### Icons + Demo Images:
1121
-
1122
- * [Font Awesome](https://fontawesome.com)
1123
- * [WeGraphics](http://wegraphics.net/downloads/free-ultimate-blurred-background-pack/)
1124
- * [Unsplash](https://unsplash.com/)
1125
-
1126
- ### Other:
1127
-
1128
- * [Jekyll](http://jekyllrb.com/)
1129
- * [Breakpoint](http://breakpoint-sass.com/)
1130
- * [jQuery](http://jquery.com/)
1131
- * [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
1132
- * [Lity](https://sorgalla.com/lity/)
1133
- * [Lunr](http://lunrjs.com/)
1134
-
1135
- ---
1136
-
1137
- ## License
1138
-
1139
- The theme is available as open source under the terms of the [MIT License](LICENSE).
1140
-
1141
- [jekyll-seo-tag]: https://github.com/jekyll/jekyll-seo-tag
1142
- [jekyll-feed]: https://github.com/jekyll/jekyll-feed
1143
- [jekyll-paginate]: https://github.com/jekyll/jekyll-paginate
1144
- [jekyll-sitemap]: https://github.com/jekyll/jekyll-sitemap
1145
- [jekyll-archives]: https://github.com/jekyll/jekyll-archives
1
+ # [So Simple Jekyll Theme][1]
2
+
3
+ [![Gem](https://img.shields.io/gem/v/jekyll-theme-so-simple.svg?style=flat-square)](https://rubygems.org/gems/jekyll-theme-so-simple)
4
+
5
+ So Simple is a simple [Jekyll theme](https://jekyllrb.com/docs/themes/) for your words and pictures. Built to provide:
6
+
7
+ * A variety of layouts with clean and readable typography.
8
+ * [Microformats](http://microformats.org/wiki/microformats2) markup to make post content machine-readable and discoverable.
9
+ * Disqus Comments and Google Analytics support.
10
+ * SEO best practices via [Jekyll SEO Tag][jekyll-seo-tag].
11
+ * Options to customize the theme and make it your own.
12
+
13
+ :sparkles: **See what's new in the [CHANGELOG](CHANGELOG.md).**
14
+
15
+ [![So Simple live preview][2]][1]
16
+
17
+ ![So Simple layouts](screenshots.jpg)
18
+
19
+ [1]: https://mmistakes.github.io/so-simple-theme/
20
+ [2]: screenshot.png "site preview"
21
+
22
+ ## Table of Contents
23
+
24
+ 1. [Installation](#installation)
25
+ 1. [Ruby Gem Method](#ruby-gem-method)
26
+ 2. [GitHub Pages Method](#github-pages-method)
27
+ 1. [Remove the Unnecessary](#remove-the-unnecessary)
28
+ 2. [Upgrading](#upgrading)
29
+ 1. [Ruby Gem](#ruby-gem)
30
+ 2. [Remote Theme](#remote-theme)
31
+ 3. [Use Git](#use-git)
32
+ 4. [Update Files Manually](#update-files-manually)
33
+ 3. [Structure](#structure)
34
+ 1. [Starting Fresh](#starting-fresh)
35
+ 2. [Starting from `jekyll new`](#starting-from-jekyll-new)
36
+ 4. [Configuring](#configuring)
37
+ 1. [Site Locale](#site-locale)
38
+ 2. [Site URL](#site-url)
39
+ 3. [Site Base URL](#site-base-url)
40
+ 4. [Date Format](#date-format)
41
+ 5. [Reading Time](#reading-time)
42
+ 6. [Mathematics](#mathematics)
43
+ 7. [Google Fonts](#google-fonts)
44
+ 8. [Pagination](#pagination)
45
+ 9. [Search](#search)
46
+ 10. [Taxonomy Pages](#taxonomy-pages)
47
+ 11. [Comments (via Disqus)](#comments-via-disqus)
48
+ 12. [Google Analytics](#google-analytics)
49
+ 13. [Other](#other)
50
+ 5. [Layouts](#layouts)
51
+ 1. [`layout: default`](#layout-default)
52
+ 2. [`layout: post`](#layout-post)
53
+ 3. [`layout: page`](#layout-page)
54
+ 4. [`layout: home`](#layout-home)
55
+ 5. [`layout: posts`](#layout-posts)
56
+ 6. [`layout: categories`](#layout-categories)
57
+ 7. [`layout: tags`](#layout-tags)
58
+ 8. [`layout: collection`](#layout-collection)
59
+ 9. [`layout: category`](#layout-category)
60
+ 10. [`layout: tag`](#layout-tag)
61
+ 11. [`layout: search`](#layout-search)
62
+ 6. [Images](#images)
63
+ 7. [Theme Text](#theme-text)
64
+ 8. [Navigation](#navigation)
65
+ 9. [Author](#author)
66
+ 10. [Footer](#footer)
67
+ 1. [Footer Links](#footer-links)
68
+ 2. [Copyright Text](#copyright-text)
69
+ 11. [Helpers](#helpers)
70
+ 1. [Responsive Embed](#responsive-embed)
71
+ 2. [Table of Contents](#table-of-contents)
72
+ 12. [Migration Guide](#migration-guide)
73
+ 1. [Global Changes](#global-changes)
74
+ 2. [Browser Support](#browser-support)
75
+ 3. [Configuration Changes](#configuration-changes)
76
+ 1. [Locale Changes](#locale-changes)
77
+ 2. [Owner Changes](#owner-changes)
78
+ 3. [Google Analytics Changes](#google-analytics-changes)
79
+ 4. [Disqus Comments Changes](#disqus-comments-changes)
80
+ 4. [Search Changes](#search-changes)
81
+ 5. [Image Changes](#image-changes)
82
+ 6. [Development Changes](#development-changes)
83
+ 7. [Step-by-Step](#step-by-step)
84
+ 13. [Customization](#customization)
85
+ 1. [Overriding Includes and Layouts](#overriding-includes-and-layouts)
86
+ 2. [Customizing Sass (SCSS)](#customizing-sass-scss)
87
+ 3. [Customizing JavaScript](#customizing-javascript)
88
+ 14. [Font Awesome Icons](#font-awesome-icons)
89
+ 15. [Development](#development)
90
+ 1. [JavaScript Build Script](#javascript-build-script)
91
+ 16. [Contributing](#contributing)
92
+ 17. [Credits](#credits)
93
+ 18. [License](#license)
94
+
95
+ ## Installation
96
+
97
+ If you're running Jekyll v3.5+ and self-hosting you can quickly install the theme as a Ruby gem. If you're hosting with [**GitHub Pages**](https://pages.github.com/) you can install as a [remote theme](https://github.com/benbalter/jekyll-remote-theme) or directly copy all of the theme files (see [structure](#structure) below) into your project.
98
+
99
+ ### Ruby Gem Method
100
+
101
+ 1. Add this line to your Jekyll site's `Gemfile` (or [create one](example/Gemfile)):
102
+
103
+ ```ruby
104
+ gem "jekyll-theme-so-simple"
105
+ ```
106
+
107
+ 2. Add this line to your Jekyll site's `_config.yml` file:
108
+
109
+ ```yaml
110
+ theme: jekyll-theme-so-simple
111
+ ```
112
+
113
+ 3. Then run [Bundler](http://bundler.io/) to install the theme gem and dependencies:
114
+
115
+ ```terminal
116
+ bundle install
117
+ ```
118
+
119
+ ### GitHub Pages Method
120
+
121
+ GitHub Pages has added [full support](https://github.com/blog/2464-use-any-theme-with-github-pages) for any GitHub-hosted theme.
122
+
123
+ 1. Replace `gem "jekyll"` with:
124
+
125
+ ```ruby
126
+ gem "github-pages", group: :jekyll_plugins
127
+ ```
128
+
129
+ 2. Run `bundle update` and verify that all gems install properly.
130
+
131
+ 3. Add `remote_theme: "mmistakes/jekyll-theme-so-simple"` to your
132
+ `_config.yml` file. Remove any other `theme:` or `remote_theme:` entries.
133
+
134
+ ---
135
+
136
+ **Note:** Your Jekyll site should be viewable immediately at <http://USERNAME.github.io>. If it's not, you can force a rebuild by pushing empty commits to GitHub (see below for more details).
137
+
138
+ If you're hosting several Jekyll based sites under the same GitHub username you will have to use Project Pages instead of User Pages. Essentially you rename the repo to something other than **USERNAME.github.io** and create a `gh-pages` branch off of `master`. For more details on how this works, check [GitHub's documentation](https://help.github.com/articles/user-organization-and-project-pages/).
139
+
140
+ #### Remove the Unnecessary
141
+
142
+ If you forked or downloaded the [`so-simple-theme` repo](https://github.com/mmistakes/so-simple-theme) you can safely remove the following files and folders:
143
+
144
+ * `docs/*`
145
+ * `example/*`
146
+ * `.editorconfig`
147
+ * `.gitattributes`
148
+ * `CHANGELOG.md`
149
+ * `Gemfile`
150
+ * `jekyll-theme-so-simple.gemspec`
151
+ * `Rakefile`
152
+ * `README.md`
153
+ * `screenshot.png`
154
+
155
+ ## Upgrading
156
+
157
+ If you're using the Ruby Gem or remote theme versions of So Simple, upgrading is fairly painless.
158
+
159
+ To check which version you are currently using, view the source of your built site and you should something similar to:
160
+
161
+ ```
162
+ <!--
163
+ So Simple Jekyll Theme 3.0.0
164
+ Copyright 2013-2018 Michael Rose - mademistakes.com | @mmistakes
165
+ Free for personal and commercial use under the MIT license
166
+ https://github.com/mmistakes/so-simple-theme/blob/master/LICENSE
167
+ -->
168
+ ```
169
+
170
+ This will be at the top of every `.html` file, `/assets/css/main.css`, and `/assets/js/main.js`.
171
+
172
+ ### Ruby Gem
173
+
174
+ Simply run `bundle update` if you're using Bundler (have a `Gemfile`) or `gem update jekyll-theme-so-simple` if you're not.
175
+
176
+ ### Remote Theme
177
+
178
+ When hosting with [GitHub Pages](https://pages.github.com/) you'll need to push up a commit to force a rebuild with the latest [theme release](https://github.com/mmistakes/so-simple-theme/releases).
179
+
180
+ An empty commit will get the job done too if you don't have anything to push at the moment:
181
+
182
+ ```terminal
183
+ git commit --allow-empty -m "Force rebuild of site"
184
+ ```
185
+
186
+ ### Use Git
187
+
188
+ If you want to get the most out of the Jekyll + GitHub Pages workflow, then you'll need to utilize Git. To pull down theme updates manually you must first ensure there's an upstream remote. If you forked the theme's repo then you're likely good to go.
189
+
190
+ To double check, run `git remote -v` and verify that you can fetch from `origin https://github.com/mmistakes/so-simple-theme.git`.
191
+
192
+ To add it you can do the following:
193
+
194
+ ```terminal
195
+ git remote add upstream https://github.com/mmistakes/so-simple-theme.git
196
+ ```
197
+
198
+ #### Pull Down Updates
199
+
200
+ Now you can pull any commits made to theme's `master` branch with:
201
+
202
+ ```terminal
203
+ git pull upstream master
204
+ ```
205
+
206
+ Depending on the amount of customizations you've made after forking, there's likely to be merge conflicts. Work through any conflicting files Git flags, staging the changes you wish to keep, and then commit them.
207
+
208
+ ### Update Files Manually
209
+
210
+ Another way of dealing with updates is [downloading the theme](https://github.com/mmistakes/so-simple-theme/archive/master.zip) --- replacing your layouts, includes, and assets with the newer ones manually. To be sure that you don't miss any changes review the theme's [commit history](https://github.com/mmistakes/so-simple-theme/commits/master) to see what has changed.
211
+
212
+ Here's a quick checklist of the important folders/files you'll want to be mindful of:
213
+
214
+ | Name | |
215
+ | ---------------------- | ------------------------------------------------------------------------------ |
216
+ | `_layouts` | Replace all. Apply edits if you customized any layouts. |
217
+ | `_includes` | Replace all. Apply edits if you customized any includes. |
218
+ | `assets` | Replace all. Apply edits if you customized stylesheets or scripts. |
219
+ | `_sass` | Replace all. Apply edits if you customized Sass partials. |
220
+ | `_data/navigation.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
221
+ | `_data/text.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
222
+ | `_config.yml` | Safe to keep. Verify that there were no major structural changes or additions. |
223
+
224
+ ---
225
+
226
+ **Note:** If you're not seeing the latest version, be sure to flush browser and CDN caches. Depending on your hosting environment older versions of `/assets/css/main.css`, `/assets/js/main.min.js`, or `*.html` files may be cached.
227
+
228
+ ## Structure
229
+
230
+ Layouts, includes, Sass partials, and data files are all placed in their default locations. Stylesheets and scripts can be found in `assets`, and a few development related files in the project's root directory.
231
+
232
+ **Please note:** If you installed So Simple via the Ruby Gem or remote theme methods, theme files found in `/_layouts`, `/_includes`, `/_sass`, and `/assets` will be missing from your project. This is normal as they are bundled with the [`jekyll-theme-so-simple`](https://rubygems.org/gems/jekyll-theme-so-simple) gem.
233
+
234
+ ```
235
+ ├── _data # data files
236
+ | └── text.yml # theme text
237
+ ├── _includes # theme includes
238
+ ├── _layouts # theme layouts (see below for usage)
239
+ ├── _sass # Sass partials
240
+ ├── assets
241
+ | ├── css
242
+ | | └── main.scss
243
+ | └── js
244
+ | └── main.min.js
245
+ ├── _config.yml # sample configuration
246
+ └── index.md # sample home page (recent posts/not paginated)
247
+ ```
248
+
249
+ ### Starting Fresh
250
+
251
+ After creating a `Gemfile` and installing the theme you'll need to add and edit the following files:
252
+
253
+ * [`_config.yml`](_config.yml)
254
+ * [`/_data/text.yml`](_data/text.yml)
255
+ * [`index.md`](index.md)
256
+
257
+ **Note:** Consult the [**pagination**](#pagination) documentation below for instructions on how to enable it on the home page.
258
+
259
+ ### Starting from `jekyll new`
260
+
261
+ Using the `jekyll new` command will get you up and running the quickest.
262
+
263
+ Edit your `Gemfile` and `_config.yml` files following the [installation guide](#installation) above and [configuration guide](#configuring) below, then create `_data/text.yml` as instructed earlier.
264
+
265
+ ## Configuring
266
+
267
+ Configuration of site-wide elements (`locale`, `title`, `description`, `url`, `logo`, `author`, etc.) happens in your project's `_config.yml`. See the [example configuration](example/_config.yml) in this repo for additional reference.
268
+
269
+ | Name | Description | Example |
270
+ | ------------- | ------------------------------------------------------------------------ | ----------------------------------- |
271
+ | `locale` | Primary language for the site. | `"en-us"` |
272
+ | `title` | Site's title. | `"My Awesome Site"` |
273
+ | `description` | A short description. | `"This is my site, it is awesome."` |
274
+ | `baseurl` | Used to test the website under the same base url it will be deployed to. | `/my-base-path` |
275
+ | `url` | The full URL to your site. | `"https://your-site.com"` |
276
+ | `logo` | Path to a site-wide logo used in masthead. | `/images/your-logo.png` |
277
+
278
+ ### Site Locale
279
+
280
+ **`site.locale`** is used to declare the primary language for each web page within the site.
281
+
282
+ _Example:_ locale: `"en-US"` sets the lang attribute for the site to the United States flavor of English, while `en-GB` would be for the United Kingdom style of English. Country codes are optional and the shorter variation `locale: "en"` is also acceptable. To find your language and country codes check this [reference table](<https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx>).
283
+
284
+ Properly setting the locale is important for associating localized text found in the text data file.
285
+
286
+ **Note:** The theme defaults to text in English (`en`, `en-US`, `en-GB`). If you change locale in `_config.yml` to something else be sure to add the corresponding locale key and translated text to [`_data/text.yml`](_data/text.yml).
287
+
288
+ ### Site URL
289
+
290
+ The base hostname and protocol for your site. If you're hosting with GitHub Pages this will be something like `url: "https://github.io.mmistakes"` or `url: "https://your-site.com"` if you have a custom domain name.
291
+
292
+ GitHub Pages now [forces `https://` for new sites](https://help.github.com/articles/securing-your-github-pages-site-with-https/), so be mindful of that when setting your URL to avoid mixed-content warnings.
293
+
294
+ **Note:** Jekyll overrides the value of `url` with `http://localhost:4000` when running `jekyll serve` locally in development. If you want to avoid this behavior set `JEKYLL_ENV=production` to [force the environment](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time) to production.
295
+
296
+ ### Site Base URL
297
+
298
+ This option causes all kinds of confusion in the Jekyll community. If you're not hosting your site as a [GitHub Project Page](https://help.github.com/articles/user-organization-and-project-pages/) or in a subfolder (e.g., `/blog`), then don't mess with it.
299
+
300
+ In the case of the **So Simple** demo site it's hosted on GitHub at <https://mmistakes.github.io/so-simple-theme>. To correctly set this base path I'd use `url: "https://mmistakes.github.io"` and `baseurl: "/so-simple-theme"`.
301
+
302
+ For more information on how to properly use `site.url` and `site.baseurl` as intended by the Jekyll maintainers, check [Parker Moore's post on the subject](https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/).
303
+
304
+ **Note:** When using `baseurl` remember to include it as part of your link and asset paths in your content. Values of `url:` and `baseurl: "/blog"` would make your local site visible at <http://localhost:4000/blog> and not <http://localhost:4000>. You can either prepend all your asset and internal link paths with `{{ site.baseurl }}` or use Jekyll's `relative_url`.
305
+
306
+ To use the example values above the following image path of `{{ '/images/my-image.jpg' | relative_url }}` would output correctly as `http://localhost:4000/blog/images/my-image.jpg`.
307
+
308
+ Without the `relative_url` filter that asset path would be missing `/blog` and you'd have a broken image on your page.
309
+
310
+ ### Date Format
311
+
312
+ You can change the default date format by specifying `date_format` in `_config.yml`. It accepts any of the standard [Liquid date formats](http://shopify.github.io/liquid/filters/date/).
313
+
314
+ For example the default value of `"%B %-d, %Y"` could be changed like so:
315
+
316
+ ```yaml
317
+ date_format: "%Y-%m-%d"
318
+ ```
319
+
320
+ ### Reading Time
321
+
322
+ Enable estimated reading time snippets site-wide with `read_time: true`. **`200`** has been set as the default words per minute value — which can be changed via `words_per_minute` in your `_config.yml` file.
323
+
324
+ ```yaml
325
+ read_time: true
326
+ words_per_minute: 200
327
+ ```
328
+
329
+ ### Mathematics
330
+
331
+ Enable [**MathJax**](https://www.mathjax.org) (a JavaScript display engine for mathematics) site-wide with `mathjax: true`.
332
+
333
+ ### Google Fonts
334
+
335
+ Easily use [**Google Fonts**](https://fonts.google.com/) throughout your site by replacing the font `name` and `weights` accordingly. Suggested font pairings are as follows:
336
+
337
+ ```yaml
338
+ google_fonts:
339
+ - name: "Source Sans Pro"
340
+ weights: "400,400i,700,700i"
341
+ - name: "Lora"
342
+ weights: "400,400i,700,700i"
343
+ ```
344
+
345
+ **Note:** If other font families are used, be sure to add, then override the following SCSS variables in `/assets/css/main.scss` with the `font-family` values Google provides.
346
+
347
+ ```scss
348
+ $serif-font-family: "Lora", serif;
349
+ $sans-serif-font-family: "Source Sans Pro", sans-serif;
350
+ $monospace-font-family: Menlo, Consolas, Monaco, "Courier New", Courier,
351
+ monospace;
352
+
353
+ $base-font-family: $sans-serif-font-family;
354
+ $headline-font-family: $sans-serif-font-family;
355
+ $title-font-family: $serif-font-family;
356
+ $description-font-family: $serif-font-family;
357
+ $meta-font-family: $serif-font-family;
358
+ ```
359
+
360
+ See [stylesheet documentation](#customizing-sass-scss) below for more information on overriding the theme's default variables.
361
+
362
+ ### Pagination
363
+
364
+ Break up the main listing of posts on the home page across multiple pages by [enabling pagination](http://jekyllrb.com/docs/pagination/).
365
+
366
+ 1. Include the [`jekyll-paginate`][jekyll-paginate] plugin in your `Gemfile`.
367
+
368
+ ```ruby
369
+ group :jekyll_plugins do
370
+ gem "jekyll-paginate"
371
+ end
372
+ ```
373
+
374
+ 2. Add `jekyll-paginate` to the `plugins` array (previously `gems`) in your `_config.yml` file and the following pagination settings:
375
+
376
+ ```yaml
377
+ paginate: 10 # amount of posts to show per page
378
+ paginate_path: /page:num/
379
+ ```
380
+
381
+ 3. Create `index.html` (or rename `index.md`) in the root of your project and add the following front matter:
382
+
383
+ ```yaml
384
+ layout: home
385
+ paginate: true
386
+ ```
387
+
388
+ ### Search
389
+
390
+ To index the full content of your documents for use in a [search page](#layout-search), set `search_full_content` to `true` in `_config.yml`:
391
+
392
+ ```yaml
393
+ search_full_content: true
394
+ ```
395
+
396
+ **Note:** Large amounts of posts will increase the size of the search index, impacting page load performance. Setting `search_full_content` to `false` (the default) restricts indexing to the first 50 words of body content.
397
+
398
+ ### Taxonomy Pages
399
+
400
+ By default, category and tags added to a post are not linked to taxonomy archive pages. To enable this behavior and link to pages with posts grouped by category or tag, add the following:
401
+
402
+ ```yaml
403
+ category_archive_path: "/categories/#"
404
+ tag_archive_path: "/tags/#"
405
+ ```
406
+
407
+ These paths should mimic the permalinks used for your [**categories**](#layout-categories) and [**tags archive**](#layout-tags) pages. The `#` at the end is necessary to target the correct taxonomy section on the pages.
408
+
409
+ For example if you were to create `categories.md` with the following front matter:
410
+
411
+ ```yaml
412
+ title: Categories Archive
413
+ layout: categories
414
+ permalink: /foo/
415
+ ```
416
+
417
+ You'd need to change `category_archive_path` to `"/foo/#` for category links to function properly.
418
+
419
+ **Note:** You can create dedicated category and tag pages manually with [`layout: category`](#layout-category) and [`layout: tag`](#layout-tag). Or use plugins like [**jekyll-archives**][jekyll-archives] or [**jekyll-paginate-v2**](https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-AUTOPAGES.md) to generate them automatically.
420
+
421
+ ### Comments (via Disqus)
422
+
423
+ If you have a [**Disqus**](https://disqus.com/) account, you can show a comments section below each post.
424
+
425
+ To enable Disqus comments, add your [Disqus shortname](https://help.disqus.com/customer/portal/articles/466208) to your project's `_config.yml` file:
426
+
427
+ ```yaml
428
+ disqus:
429
+ shortname: my_disqus_shortname
430
+ ```
431
+
432
+ Comments only appear in production when built with the following [environment value](http://jekyllrb.com/docs/configuration/#specifying-a-jekyll-environment-at-build-time): `JEKYLL_ENV=production` to avoid polluting your Disqus account with `localhost` content.
433
+
434
+ If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's front matter.
435
+
436
+ ### Google Analytics
437
+
438
+ To enable [**Google Analytics**](https://analytics.google.com/analytics/web/), add your tracking ID to `_config.yml` like so:
439
+
440
+ ```yaml
441
+ google_analytics: UA-NNNNNNNN-N
442
+ ```
443
+
444
+ Similar to Disqus comments above, the Google Analytics tracking script will only appear in production when using the following environment value: `JEKYLL_ENV=production`.
445
+
446
+ ### Other
447
+
448
+ For more configuration options be sure to consult the documentation for:
449
+ [**jekyll-seo-tag**][jekyll-seo-tag], [**jekyll-feed**][jekyll-feed],
450
+ [**jekyll-paginate**][jekyll-paginate], and [**jekyll-sitemap**][jekyll-sitemap].
451
+
452
+ ---
453
+
454
+ ## Layouts
455
+
456
+ This theme provides the following layouts, which you can use by setting the `layout` [front matter](https://jekyllrb.com/docs/frontmatter/) on each page, like so:
457
+
458
+ ```yaml
459
+ ---
460
+ layout: name
461
+ ---
462
+ ```
463
+
464
+ ### `layout: default`
465
+
466
+ This layout handles all of the basic page scaffolding placing the page content between the masthead and footer elements. All other layouts inherit this one and provide additional styling and features inside of the `{{ content }}` block.
467
+
468
+ ### `layout: post`
469
+
470
+ This layout accommodates the following front matter:
471
+
472
+ | Name | Type | Description |
473
+ | ---- | ----- | ---------- |
474
+ | `image` | String | Path to a large image associated with the post. Also used for [OpenGraph](http://ogp.me/), [Twitter Cards](https://dev.twitter.com/cards), and site feed thumbnail if enabled. [Suggested image sizes](#images). |
475
+ | `image.path` | String | Same as above. Used when a `thumbnail` or `caption` needs to be assigned to the `image` object as well. |
476
+ | `image.caption` | String | Describes the image or provides credit. Markdown is allowed. |
477
+ | `author` | Object or string | Specify a post's author `name`, `picture`, `twitter`, `links`, etc. |
478
+ | `comments` | Boolean | Disable comments with `comments: false`. |
479
+ | `share` | Boolean | Add social share links to a post with `share: true`. |
480
+
481
+ **Post image example:**
482
+
483
+ ```yaml
484
+ image:
485
+ path: /images/post-image-lg.jpg
486
+ thumbnail: /images/post-image-th.jpg
487
+ caption: "Photo credit [Unsplash](https://unsplash.com/)
488
+ ```
489
+
490
+ **Note:** `image.feature` front matter has been deprecated, to fully support [jekyll-seo-tag][jekyll-seo-tag]. If you are not using `thumbnail` or `caption` the post image can be assigned more concisely as `image: /images/your-post-image.jpg`.
491
+
492
+ **Post author example:**
493
+
494
+ ```yaml
495
+ # post specific author data if different from what is set in _config.yml
496
+ author:
497
+ name: John Doe
498
+ picture: /images/john-doe.jpg
499
+ twitter: johndoe
500
+ ```
501
+
502
+ **Note:** Author information can centralized in `_data/authors.yml` by doing following in the document's front matter:
503
+
504
+ ```yaml
505
+ author: johndoe
506
+ ```
507
+
508
+ With the corresponding author key in `_data/authors.yml`:
509
+
510
+ ```yaml
511
+ johndoe:
512
+ name: John Doe
513
+ picture: /images/john-doe.jpg
514
+ twitter: johndoe
515
+ ```
516
+
517
+ **Note:** `author.picture` recommended size is `150 x 150` pixels.
518
+
519
+ #### Author Links
520
+
521
+ To define what links appear in the author sidebar use the `authors.links` key in either `_config.yml` or `/_data/authors.yml`.
522
+
523
+ | Name | Description |
524
+ | ------- | ---------------------------------------------------------------------------------------------------------------- |
525
+ | `title` | Describes the link. Not visible, used for accessibility purposes. |
526
+ | `url` | URL the link points to. |
527
+ | `icon` | Corresponds with a [Font Awesome icon](https://fontawesome.com/icons?d=gallery) e.g., `fab fa-twitter-square`. |
528
+
529
+ **Example:**
530
+
531
+ ```yaml
532
+ author:
533
+ links:
534
+ - title: Twitter
535
+ url: https://twitter.com/username
536
+ icon: fab fa-twitter-square
537
+ - title: Instagram
538
+ url: https://instagram.com/username
539
+ icon: fab fa-instagram
540
+ - title: GitHub
541
+ url: https://github.com/username
542
+ icon: fab fa-github-square
543
+ ```
544
+
545
+ ### `layout: page`
546
+
547
+ Visually this layout looks and acts similar `layout: post`, with the following
548
+ differences.
549
+
550
+ * Author sidebar and page meta (published date, categories, and tags) are ommitted.
551
+ * Page is less wide due to omitted sidebar.
552
+ * Disqus comments are omitted.
553
+ * Next/Previous post navigation links omitted.
554
+
555
+ The page layout forms the base for several other layouts like [`home`](#layout-home), [`posts`](#layout-posts), [`categories`](#layout-categories), [`tags`](#layout-tags), [`collection`](#layout-collection), [`category`](#layout-category), [`tag`](#layout-tag), and [`search`](#layout-search).
556
+
557
+ ### `layout: home`
558
+
559
+ This layout accommodates the same front matter as `layout: page`, with the
560
+ addition of the following:
561
+
562
+ ```yaml
563
+ paginate: true # enables pagination loop, see section above for additional setup
564
+ entries_layout: # list (default), grid
565
+ ```
566
+
567
+ When not enabled the page defaults to showing the latest 10 posts. To change the amount of posts shown, you can edit or override the `limit` value in [`/_includes/posts-limit.html`](_includes/posts-limit.html).
568
+
569
+ ```liquid
570
+ {% for entry in site.posts limit: 10 %}
571
+ {% include entry.html %}
572
+ {% endfor %}
573
+ ```
574
+
575
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
576
+
577
+ ### `layout: posts`
578
+
579
+ This layout displays all posts grouped by the year they were published. It accommodates the same front matter as `layout: page`.
580
+
581
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
582
+
583
+ ### `layout: categories`
584
+
585
+ This layout displays all posts grouped category. It accommodates the same front matter as `layout: page`.
586
+
587
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
588
+
589
+ ### `layout: tags`
590
+
591
+ This layout displays all posts grouped by tag. It accommodates the same front matter as `layout: page`.
592
+
593
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
594
+
595
+ ### `layout: collection`
596
+
597
+ This layout displays all documents grouped by a specific collection. It accommodates the same front matter as `layout: page` with the addition of the following:
598
+
599
+ ```yaml
600
+ collection: # collection name
601
+ entries_layout: # list (default), grid
602
+ ```
603
+
604
+ To create a page showing all documents in the `recipes` collection you'd create `recipes.md` in the root of your project and add this front matter:
605
+
606
+ ```yaml
607
+ title: Recipes
608
+ layout: collection
609
+ permalink: /recipes/
610
+ collection: recipes
611
+ ```
612
+
613
+ By default, documents are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
614
+
615
+ ### `layout: category`
616
+
617
+ This layout displays all posts grouped by a specific category. It accommodates the same front matter as `layout: page` with the addition of the following:
618
+
619
+ ```yaml
620
+ taxonomy: # category name
621
+ entries_layout: # list (default), grid
622
+ ```
623
+
624
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
625
+
626
+ To create a page showing all posts assigned to the category `foo` you'd create `foo.md` in the root of your project and add this front matter:
627
+
628
+ ```yaml
629
+ title: Foo
630
+ layout: category
631
+ permalink: /categories/foo/
632
+ taxonomy: foo
633
+ ```
634
+
635
+ ### `layout: tag`
636
+
637
+ This layout displays all posts grouped by a specific tag. It accommodates the same front matter as `layout: page` with the addition of the following:
638
+
639
+ ```yaml
640
+ taxonomy: # tag name
641
+ entries_layout: # list (default), grid
642
+ ```
643
+
644
+ By default, posts are shown in a list view. To change to a grid view add `entries_layout: grid` to the page's front matter.
645
+
646
+ To create a page showing all posts assigned to the tag `foo bar` you'd create `foo-bar.md` in the root of your project and add this front matter:
647
+
648
+ ```yaml
649
+ title: Foo Bar
650
+ layout: tag
651
+ permalink: /tags/foo-bar/
652
+ taxonomy: foo bar
653
+ ```
654
+
655
+ ### `layout: search`
656
+
657
+ This layout displays a search form and displays related pages based on the query.
658
+
659
+ Page content index: `title`, `excerpt`, `content` (when enabled), `categories`, `tags`, and `url`.
660
+
661
+ If you would like to exclude specific pages/posts from the search index set the search flag to `false` in their front matter.
662
+
663
+ ```yaml
664
+ search: false
665
+ ```
666
+
667
+ To index the full content of your documents set `search_full_content` to `true` in `_config.yml`:
668
+
669
+ ```yaml
670
+ search_full_content: true
671
+ ```
672
+
673
+ **Note:** Large amounts of posts will increase the size of the search index, impacting page load performance. Setting `search_full_content` to `false` (the default) restricts indexing to the first 50 words of body content.
674
+
675
+ ## Images
676
+
677
+ Suggested image sizes in pixels are as follows:
678
+
679
+ | Image | Description | Size |
680
+ | ----- | ----------- | ---- |
681
+ | `site.logo` | Site-wide logo used in masthead. | `200 x 200` |
682
+ | `page.image.path` | Large full-width document image. | Tall images will push content down the page. `1600 x 600` is a good middle-ground size to aim for. |
683
+ | `page.image` | Short-hand for `page.image.path` when used alone (without `thumbnail`, `caption`, or other variables). | Same as `page.image.path` |
684
+ | `page.image.thumbnail` | Small document image used in grid view. | `400 x 200` |
685
+ | `author.picture` | Author picture in post sidebar. | `150 x 150` |
686
+
687
+ ## Theme Text
688
+
689
+ To change text found throughout the theme, copy the following
690
+ [`/_data/theme.yml`](_data/text.yml) file and customize as necessary.
691
+
692
+ When adding new texts be sure the keys match these [language/country codes](<https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx>), that may be used for [`site.locale`](#site-locale).
693
+
694
+ ## Navigation
695
+
696
+ To define what pages are linked in the top navigation:
697
+
698
+ 1. Create a [`/_data/navigation.yml`](_data/navigation.yml) file.
699
+
700
+ 2. Add pages in the order you'd like them to appear:
701
+
702
+ ```yaml
703
+ - title: Posts
704
+ url: /posts/
705
+ - title: Categories
706
+ url: /categories/
707
+ - title: External Page
708
+ url: https://whatever-site.com/page.html
709
+ - title: Search
710
+ url: /search/
711
+ ```
712
+
713
+ **Note:** Long titles or many links may cause the navigation bar to break into multiple lines, especially on smaller screens. Keep this in mind as you develop your site's primary navigation.
714
+
715
+ ## Author
716
+
717
+ Author information is used as meta data for post "by lines" and propagates the `creator` field of Twitter summary cards with the following front matter in `_config.yml`:
718
+
719
+ ```yaml
720
+ author:
721
+ name: John Doe
722
+ twitter: johndoetwitter
723
+ picture: /images/johndoe.png
724
+ ```
725
+
726
+ Site-wide author information can be overridden in a document's front matter in the same way:
727
+
728
+ ```yaml
729
+ author:
730
+ name: Jane Doe
731
+ twitter: janedoetwitter
732
+ picture: /images/janedoe.png
733
+ ```
734
+
735
+ Or by specifying a corresponding key in the document's front matter, that exists in `site.data.authors`. E.g., you have the following in the document's front matter:
736
+
737
+ ```yaml
738
+ author: megaman
739
+ ```
740
+
741
+ And you have the following in `_data/authors.yml`:
742
+
743
+ ```yaml
744
+ megaman:
745
+ name: Mega Man
746
+ twitter: megamantwitter
747
+ picture: /images/megaman.png
748
+
749
+ drlight:
750
+ name: Dr. Light
751
+ twitter: drlighttwitter
752
+ picture: /images/drlight.png
753
+ ```
754
+
755
+ Currently `author.picture` is only used in `layout: post`. Recommended size is `150 x 150` pixels.
756
+
757
+ ## Footer
758
+
759
+ The footer links and copyright text can both be customized.
760
+
761
+ ### Footer Links
762
+
763
+ Footer links are set in `_config.yml` under the `footer_links` key.
764
+
765
+ | Name | Description |
766
+ | ------- | ---------------------------------------------------------------------------------------------------------------- |
767
+ | `title` | Describes the link. Not visible, used for accessibility purposes. |
768
+ | `url` | URL the link points to. |
769
+ | `icon` | Corresponds with a [Font Awesome 5 icon](https://fontawesome.com/icons?d=gallery) e.g., `fab fa-twitter-square`. |
770
+
771
+ **Examples:**
772
+
773
+ ```yaml
774
+ footer_links:
775
+ - title: Twitter
776
+ url: https://twitter.com/username
777
+ icon: fab fa-twitter-square
778
+ - title: GitHub
779
+ url: https://github.com/mmistakes
780
+ icon: fab fa-github-square
781
+ - title: Feed
782
+ url: atom.xml
783
+ icon: fas fa-rss-square
784
+ ```
785
+
786
+ ### Copyright Text
787
+
788
+ By default the copyright inserts the current year, [`site.title`](#site-title), and the words `"Powered by Jekyll & So Simple."` To change this add `copyright` to your `_config.yml` like so (Markdown is allowed):
789
+
790
+ ```yaml
791
+ copyright: "This site is made with <3 by *me, myself, and I*."
792
+ ```
793
+
794
+ ## Helpers
795
+
796
+ You can think of these Jekyll helpers as shortcodes. Since GitHub Pages doesn't allow most plugins --- [custom tags](https://jekyllrb.com/docs/plugins/#tags) are out. Instead the theme leverages [**includes**](https://jekyllrb.com/docs/templates/#includes) to do something similar.
797
+
798
+ ### Responsive Embed
799
+
800
+ Embed a video from YouTube/Vimeo or any other `iframe` content that responsively sizes to fit the width of its parent.
801
+
802
+ | Parameter | Required | Description |
803
+ | --------- | -------- | ----------- |
804
+ | `url` | Yes | Video or iframe's URL e.g., `https://www.youtube.com/watch?v=-PVofD2A9t8` |
805
+ | `ratio` | Optional | Ratio of the video or iframe content. `21:9`, `16:9`, `4:3`, `1:1`. If a ratio is not assigned `16:9` is used. |
806
+
807
+ **Example:**
808
+
809
+ ```html
810
+ {% include responsive-embed url="https://www.youtube.com/watch?v=-PVofD2A9t8" ratio="16:9" %}
811
+ ```
812
+
813
+ ### Table of Contents
814
+
815
+ To include an [auto-generated table of contents](https://kramdown.gettalong.org/converter/html.html#toc) for posts and pages, add the following helper where you'd like it to appear.
816
+
817
+ ```html
818
+ {% include toc %}
819
+ ```
820
+
821
+ ## Migration Guide
822
+
823
+ So Simple 3 is a major rewrite of the entire theme. The most notable changes are summarized below, followed by more specific changes.
824
+
825
+ It is safe to say you'll probably want to ditch all `_layouts`, `_includes`, `_sass`, `.css`, and `.js` files from v2 and use either the [Ruby gem](#ruby-gem-method) or [remote theme](github-pages-method) installation options.
826
+
827
+ ### Global Changes
828
+
829
+ * "Fork method" has been deprecated in favor of installing/upgrading the theme via a gem or remote theme.
830
+ * All `_layouts`, `_includes`, `_sass`, and JavaScript have been rebuilt.
831
+ * Properly uses `site.url` and `site.baseurl` leveraging the `relative_url` and `absolute_url` filters.
832
+ * Replaced custom `/_includes/open-graph.html` with [**jekyll-seo-tag**][jekyll-seo-tag].
833
+ * Full control over links and icons used in author sidebar and footer.
834
+ * Tag, articles, and blog starter pages have been replaced with new layouts ([`tags`](#layout-tags) and [`posts`](#layout-posts)) for easier use.
835
+ * Removed `404.md` page.
836
+ * Replaced custom `atom.xml` feed file with [**jekyll-feed**][jekyll-feed].
837
+ * Removed default `favicon.ico` and `favicon.png` files.
838
+ * Replaced simple JSON search with [**Lunr**](https://lunrjs.com/).
839
+ * Replaced [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/) with [**Lity**](https://sorgalla.com/lity/).
840
+ * Removed [FitVids.JS](http://fitvidsjs.com/).
841
+
842
+ ### Browser Support
843
+
844
+ * CSS written with modern browsers in mind. Where possible fallbacks for `float` based layouts have been used so things don't look *too broken* in browsers that don't support `display: grid` and flexbox.
845
+
846
+ ### Configuration Changes
847
+
848
+ #### Locale Changes
849
+
850
+ Format has changed from `en_US` (with an underscore) to `en-US` with a hyphen.
851
+
852
+ #### Owner Changes
853
+
854
+ `site.owner` is now `site.author` to better support [jekyll-seo-tag][jekyll-seo-tag] and [jekyll-feed][jekyll-feed].
855
+
856
+ | v2 | v3 |
857
+ |-------------------------------|----------------------------------------------------------------|
858
+ | `site.owner.name` | **`site.author.name`** |
859
+ | `site.owner.avatar` | **`site.author.picture`** |
860
+ | `site.owner.email` | **`site.author.email`** |
861
+ | `site.owner.twitter` | **`site.twitter`** |
862
+ | `site.owner.google.analytics` | **deprecated**, replaced with [jekyll-seo-tag][jekyll-seo-tag] |
863
+ | `site.owner.bing-verify` | **deprecated**, replaced with [jekyll-seo-tag][jekyll-seo-tag] |
864
+
865
+ #### Google Analytics Changes
866
+
867
+ `site.owner.google.analytics` is now `site.google_analytics`. [See documentation](#google-analytics) for more information.
868
+
869
+ #### Disqus Comments Changes
870
+
871
+ `site.owner.disqus-shortname` is now `site.disqus.shortname`. [See documentation](#comments-via-disqus) more information.
872
+
873
+ To disable comments on a particular post add `comments: false` to its front matter.
874
+
875
+ ### Search Changes
876
+
877
+ `search_omit` has been renamed to `search`. To exclude a post or page from search add `search: false` to its front matter instead.
878
+
879
+ ### Image Changes
880
+
881
+ When assigning image paths for things like the `site.logo`, `page.image.path`, `author.picture`, etc. they now require a full relative or absolute path.
882
+
883
+ In So Simple v2 images were all placed in `/images/` and assigned in front matter with just the filename. For images to properly load, you now need to prepend all paths with `/images/`... if you are storing images there e.g., `/images/your-image.jpg`.
884
+
885
+ To better support Jekyll plugin's like [jekyll-seo-tag][jekyll-seo-tag], [jekyll-feed][jekyll-feed], and [jekyll-sitemap][jekyll-sitemap] most of the `image` keys have been renamed. Adjust the front matter in all of your posts' and pages' accordingly.
886
+
887
+ | v2 | v3 |
888
+ |--------------------|--------------------------------------------|
889
+ | `image.feature` | **`image.path`** |
890
+ | `image.thumb` | **`image.thumbnail`** |
891
+ | `image.credit` | **`image.caption`** (Markdown allowed) |
892
+ | `image.creditlink` | deprecated use `**image.caption**` instead |
893
+
894
+ A post with the following v2 front matter:
895
+
896
+ ```yaml
897
+ image:
898
+ feature: feature-image-filename.jpg
899
+ thumb: thumb-image-filename.jpg
900
+ credit: Michael Rose
901
+ creditlink: https://mademistakes.com
902
+ ```
903
+
904
+ Would be converted into the following v3 front matter:
905
+
906
+ ```yaml
907
+ image:
908
+ path: /images/feature-image-filename.jpg
909
+ thumbnail: /images/thumb-image-filename.jpg
910
+ caption: "[Michael Rose](https://mademistakes)"
911
+ ```
912
+
913
+ ### Development Changes
914
+
915
+ * Replaced Grunt tasks with [npm scripts](https://css-tricks.com/why-npm-scripts/).
916
+
917
+ ### Step-by-Step
918
+
919
+ Rough steps to migrate a stock So Simple v2 fork (with no alterations) to the latest.
920
+
921
+ 1. Remove `_includes/`, `_layouts/`, `_sass/`, `jshintrc`, `Gruntfile.js`, and `search.json`.
922
+ 2. Edit `Gemfile` for either the [Ruby gem](#ruby-gem-method) or [GitHub Pages](#github-pages-method) installation methods and follow those instructions.
923
+ 3. Add the following Google Fonts to `_config.yml`:
924
+
925
+ ```yaml
926
+ google_fonts:
927
+ - name: "Source Sans Pro"
928
+ weights: "400,400i,700,700i"
929
+ - name: "Lora"
930
+ weights: "400,400i,700,700i"
931
+ ```
932
+
933
+ 4. Edit `_config.yml` paying close attention to those keys that [have been renamed](#configuration-changes) or have new relative path requirements. `locale`, `logo`, and `owner` are good places to start.
934
+ 5. Rename all instances of `image.feature`, `image.thumb`, and `image.credit` in posts/pages adhering to the [image changes](#image-changes) above.
935
+ 6. Remove the body content in `index.html` and change `layout: page` to `layout: home`. Configure [pagination](#pagination) if necessary.
936
+ 7. Remove the body content in `/search/index.md` and change `layout: page` to **`layout: search`**.
937
+ 8. Remove the body content in `/tags/index.md` and change `layout: page` to **`layout: tags`**.
938
+ 9. Remove the body content in `/articles/index.md` and change `layout: page` to **`layout: category`** and add **`taxonomy: articles`**.
939
+ 10. Remove the body content in `/body/index.md` and change `layout: page` to **`layout: category`** and add **`taxonomy: blog`**.
940
+ 11. Rename `modified` front matter in posts/pages to **`last_modified_at`** for improved parity with plugins that support it.
941
+ 12. Add `tag_archive_path: "/tags/#"` to `_config.yml` to activate tag links in post meta sidebar.
942
+ 13. Rename `avatar` to **`picture`** in `_data/authors.yml` (and in any posts/pages front matter), and edit the paths adhering to the [image path changes](#image-changes) above.
943
+
944
+ ---
945
+
946
+ ## Customization
947
+
948
+ When installing as a **Ruby gem** or **remote theme** the core theme files (`_layouts`, `_includes`, `_sass`, `assets`, etc.) will be absent from your project.
949
+
950
+ The default structure, style, and scripts of this theme can be overridden and customized in the following two ways:
951
+
952
+ ### Overriding Includes and Layouts
953
+
954
+ Theme files can be [overridden](http://jekyllrb.com/docs/themes/#overriding-theme-defaults) by placing a file with the same name into your project's `_includes` or `_layouts` directory. For instance:
955
+
956
+ * To add another social sharing button to [`_includes/social-share.html`](_includes/social-share.html), create an `_includes` directory in your project, copy `_includes/social-share.html` from So Simple's gem folder to `<your_project>/_includes` and edit that file.
957
+
958
+ **ProTip:** to locate the theme's files on your computer run `bundle show jekyll-theme-so-simple`. This returns the location of the gem-based theme files.
959
+
960
+ The theme comes with two files to help inject custom markup and content into predefined locations.
961
+
962
+ | | Description |
963
+ | --- | ----------- |
964
+ | [`_includes/head-custom.html`](_includes/head-custom.html) | Inserted inside the `<head>` element for adding metadata, favicons, etc. |
965
+ | [`_includes/footer-custom.html`](_includes/footer-custom.html) | Inserted inside the `<footer>` element before site scripts and copyright information. |
966
+
967
+ ### Customizing Sass (SCSS)
968
+
969
+ To override the default [Sass](http://sass-lang.com/guide) (located in theme's
970
+ `_sass` directory), do one of the following:
971
+
972
+ 1. Copy directly from the So Simple gem
973
+
974
+ * Go to your local So Simple gem installation directory (run
975
+ `bundle show jekyll-theme-so-simple` to get the path to it).
976
+ * Copy the contents of `/assets/css/main.scss` from there to
977
+ `<your_project>`.
978
+ * Customize what you want inside `<your_project>/assets/stylesheets/main.scss`.
979
+
980
+ 2. Copy from this repo.
981
+
982
+ * Copy the contents of [assets/css/main.scss](assets/css/main.scss) to `<your_project>`.
983
+ * Customize what you want inside `<your_project/assets/stylesheets/main.scss`.
984
+
985
+ **Note:** To customize the actual Sass partials bundled
986
+ in the gem, you will need to copy the complete contents of the `_sass` directory to `<your_project>`. Due to the way Jekyll currently imports these files it's all or nothing. Overriding a single Sass partial (or two) won't work like `_includes` and `_layouts`.
987
+
988
+ To make basic tweaks to theme's style, Sass variables can be overridden by adding to `<your_project>/assets/stylesheets/main.scss`. For instance, to change the accent color used throughout the theme add the following after all `@import` lines:
989
+
990
+ ```scss
991
+ $accent-color: tomato;
992
+ ```
993
+
994
+ ### Customizing JavaScript
995
+
996
+ To override the default JavaScript bundled in the theme, do one of the following:
997
+
998
+ 1. Copy directly from the So Simple gem
999
+
1000
+ * Go to your local So Simple gem installation directory (run
1001
+ `bundle show jekyll-theme-so-simple` to get the path to it).
1002
+ * Copy the contents of `/assets/js/main.js` from there to
1003
+ `<your_project>`.
1004
+ * Customize what you want inside `<your_project>/assets/js/main.js`.
1005
+
1006
+ 2. Copy from this repo.
1007
+
1008
+ * Copy the contents of [`/assets/js/main.js`](assets/js/main.js)
1009
+ to `<your_project>`.
1010
+ * Customize what you want inside `<your_project>/assets/js/main.js`.
1011
+
1012
+ The theme's [`/assets/js/main.min.js`](assets/js/main.min.js) file is built from jQuery plugins and other scripts found in [`/assets/js/`](assets/js).
1013
+
1014
+ ```
1015
+ ├── assets
1016
+ | ├── js
1017
+ | | ├── lunr # Lunr search plugin
1018
+ | | | ├── lunr.xx.js # Lunr language plugins
1019
+ | | | ├── ...
1020
+ | | | ├── lunr.min.js
1021
+ | | | └── lunr.stemmer.support.min.js
1022
+ | | ├── plugins
1023
+ | | | ├── jquery.smooth-scroll.min.js # make same-page links scroll smoothly
1024
+ | | | ├── lity.min.js # responsive lightbox
1025
+ | | | └── table-of-contents.js # table of contents toggle
1026
+ | | ├── main.js # jQuery plugin settings and other scripts
1027
+ | | ├── main.min.js # concatenated and minified scripts
1028
+ | | ├── search-data.json # search index used by Lunr
1029
+ ```
1030
+
1031
+ To modify or add your own scripts, include them in `assets/js/main.js` and then rebuild using `npm run build:js`. [See below for more details](#javascript-build-script).
1032
+
1033
+ If you add additional scripts to `/assets/js/plugins/` and would like them concatenated with the others, be sure to update the `uglify` script in [`package.json`](package.json). Same goes for scripts that you remove.
1034
+
1035
+ You can also add scripts to the `<head>` or closing `</body>` elements by adding paths to the following arrays in `_config.yml`.
1036
+
1037
+ **Example:**
1038
+
1039
+ ```yaml
1040
+ head_scripts:
1041
+ - https://code.jquery.com/jquery-3.2.1.min.js
1042
+ - /assets/js/your-custom-head-script.js
1043
+ footer_scripts:
1044
+ - /assets/js/your-custom-footer-script.js
1045
+ ```
1046
+
1047
+ **Note:** If you assign paths to `footer_scripts` the theme's `/assets/js/main.min.js` file will be deactivated. This script includes plugins and other scripts that will cease to function unless you specifically add them to the `footer_scripts` array.
1048
+
1049
+ ## Font Awesome Icons
1050
+
1051
+ The theme utilizes the [**Font Awesome** SVG with JS](https://fontawesome.com/) version for iconography. Prominent locations these icons appear are in the author sidebar and footer links.
1052
+
1053
+ ---
1054
+
1055
+ ## Development
1056
+
1057
+ To set up your environment to develop this theme:
1058
+
1059
+ 1. Clone this repo
1060
+ 2. `cd` into `/example` and run `bundle install`.
1061
+
1062
+ To test the theme locally as you make changes to it:
1063
+
1064
+ 1. `cd` into the root folder of the repo (e.g. `jekyll-theme-so-simple`).
1065
+ 2. Run `bundle exec rake preview` and open your browser to
1066
+ `http://localhost:4000/example/`.
1067
+
1068
+ This starts a Jekyll server using the theme's files and contents of the `example/` directory. As modifications are made, refresh your browser to see any changes.
1069
+
1070
+ ### JavaScript Build Script
1071
+
1072
+ In an effort to reduce dependencies a set of [npm scripts](https://css-tricks.com/why-npm-scripts/) are used to build `main.min.js` instead of task runners like [Gulp](http://gulpjs.com/) or [Grunt](http://gruntjs.com/). If those tools are more your style then by all means use them instead :wink:.
1073
+
1074
+ To get started:
1075
+
1076
+ 1. Install Node.js.
1077
+ 2. `cd` to the root of your project.
1078
+ 3. Install all of the dependencies by running npm install.
1079
+
1080
+ **Note:** If you upgraded from a previous version of the theme be sure you copied over [`package.json`](package.json) prior to running `npm install`. You may also need to remove your `node_modules` directory as well.
1081
+
1082
+ If all goes well, executing `npm run build:js` will compress/concatenate `main.js` and all plugin scripts into `/assets/js/main.min.js`.
1083
+
1084
+ ## Contributing
1085
+
1086
+ Found a typo in the documentation? Requesting a feature or
1087
+ [bug fix][issues]? Search through the open and closed issues before [submitting an issue][new-issue] to avoid duplication.
1088
+
1089
+ [Pull requests][using-pull-requests] are also appreciated. If this is your first time, it may be helpful to read up on the [GitHub Flow][github-flow].
1090
+
1091
+ If your contribution adds or changes the theme's behavior, make sure to update the documentation and/or sample content. Documentation lives in README.md while sample posts, pages, and collections are in the [`docs`](docs) and [`example`](example) folders.
1092
+
1093
+ [issues]: https://github.com/mmistakes/so-simple-theme/issues
1094
+ [new-issue]: https://github.com/mmistakes/so-simple-theme/issues/new
1095
+ [using-pull-requests]: https://help.github.com/articles/using-pull-requests/
1096
+ [github-flow]: https://guides.github.com/introduction/flow/
1097
+
1098
+ ### Pull Requests
1099
+
1100
+ When submitting a pull request:
1101
+
1102
+ 1. Clone the repo.
1103
+ 2. Create a branch off of `master` and give it a meaningful name (e.g.
1104
+ `my-awesome-new-feature`).
1105
+ 3. Open a pull request on GitHub and describe what problem it solves.
1106
+
1107
+ ---
1108
+
1109
+ ## Credits
1110
+
1111
+ ### Creator
1112
+
1113
+ **Michael Rose**
1114
+
1115
+ * <https://mademistakes.com>
1116
+ * <https://twitter.com/mmistakes>
1117
+ * <https://github.com/mmistakes>
1118
+
1119
+ ### Icons + Demo Images:
1120
+
1121
+ * [Font Awesome](https://fontawesome.com)
1122
+ * [WeGraphics](http://wegraphics.net/downloads/free-ultimate-blurred-background-pack/)
1123
+ * [Unsplash](https://unsplash.com/)
1124
+
1125
+ ### Other:
1126
+
1127
+ * [Jekyll](http://jekyllrb.com/)
1128
+ * [Breakpoint](http://breakpoint-sass.com/)
1129
+ * [jQuery](http://jquery.com/)
1130
+ * [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll)
1131
+ * [Lity](https://sorgalla.com/lity/)
1132
+ * [Lunr](http://lunrjs.com/)
1133
+
1134
+ ---
1135
+
1136
+ ## License
1137
+
1138
+ The theme is available as open source under the terms of the [MIT License](LICENSE).
1139
+
1140
+ [jekyll-seo-tag]: https://github.com/jekyll/jekyll-seo-tag
1141
+ [jekyll-feed]: https://github.com/jekyll/jekyll-feed
1142
+ [jekyll-paginate]: https://github.com/jekyll/jekyll-paginate
1143
+ [jekyll-sitemap]: https://github.com/jekyll/jekyll-sitemap
1144
+ [jekyll-archives]: https://github.com/jekyll/jekyll-archives