You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+69-23
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ If you're running Jekyll v3.5+ and self-hosting you can quickly install the them
21
21
22
22
### Ruby Gem Method
23
23
24
-
1. Add this line to your Jekyll site's `Gemfile` (or [create one](example/Gemfile):
24
+
1. Add this line to your Jekyll site's `Gemfile` (or [create one](example/Gemfile)):
25
25
26
26
```ruby
27
27
gem "jekyll-theme-so-simple"
@@ -71,7 +71,6 @@ If you forked or downloaded the [`so-simple-theme` repo](https://github.com/mmis
71
71
*`CHANGELOG.md`
72
72
*`Gemfile`
73
73
*`jekyll-theme-so-simple.gemspec`
74
-
*`LICENSE`
75
74
*`Rakefile`
76
75
*`README.md`
77
76
*`screenshot.png`
@@ -91,7 +90,7 @@ To check which version you are currently using, view the source of your built si
91
90
-->
92
91
```
93
92
94
-
At the top of every `.html` file, `/assets/css/main.css`, and `/assets/js/main.js`.
93
+
This will be at the top of every `.html` file, `/assets/css/main.css`, and `/assets/js/main.js`.
95
94
96
95
### Ruby Gem
97
96
@@ -131,8 +130,7 @@ Depending on the amount of customizations you've made after forking, there's lik
131
130
132
131
### Update Files Manually
133
132
134
-
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 it's probably a good idea to review
135
-
the theme's [commit history](https://github.com/mmistakes/so-simple-theme/commits/master) to see what's changed.
133
+
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.
136
134
137
135
Here's a quick checklist of the important folders/files you'll want to be mindful of:
138
136
@@ -154,7 +152,7 @@ Here's a quick checklist of the important folders/files you'll want to be mindfu
154
152
155
153
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.
156
154
157
-
**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. This is normal as they are bundled with the [`jekyll-theme-so-simple`](https://rubygems.org/gems/jekyll-theme-so-simple) gem.
155
+
**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.
158
156
159
157
```
160
158
├── _data # data files
@@ -185,7 +183,7 @@ After creating a `Gemfile` and installing the theme you'll need to add and edit
185
183
186
184
Using the `jekyll new` command will get you up and running the quickest.
187
185
188
-
Edit `_config.yml` following the guide below and then create `_data/text.yml` as instructed earlier.
186
+
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.
189
187
190
188
## Configuring
191
189
@@ -214,13 +212,13 @@ Properly setting the locale is important for associating localized text found in
214
212
215
213
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.
216
214
217
-
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.
215
+
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.
218
216
219
217
**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.
220
218
221
219
### Site Base URL
222
220
223
-
This option causes all kinds of confusion in the Jekyll community. If you're not hosting your site as a GitHub Pages Project or in a subfolder (e.g., `/blog`), then don't mess with it.
221
+
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.
224
222
225
223
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"`.
226
224
@@ -230,6 +228,8 @@ For more information on how to properly use `site.url` and `site.baseurl` as int
230
228
231
229
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`.
232
230
231
+
Without the `relative_url` filter that asset path would be missing `/blog` and you'd have a broken image on your page.
232
+
233
233
### Date Format
234
234
235
235
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/).
@@ -251,7 +251,7 @@ words_per_minute: 200
251
251
252
252
### Mathematics
253
253
254
-
Enable [MathJax](https://www.mathjax.org) (a JavaScript display engine for mathematics) site-wide with `mathjax: true`.
254
+
Enable [**MathJax**](https://www.mathjax.org) (a JavaScript display engine for mathematics) site-wide with `mathjax: true`.
See stylesheet documentation below for more information on overriding the theme's default variables.
283
+
See [stylesheet documentation](#customizing-sass-scss) below for more information on overriding the theme's default variables.
284
284
285
285
### Pagination
286
286
287
-
Break up the main listing of posts on the home page into smaller lists across multiple pages by [enabling pagination](http://jekyllrb.com/docs/pagination/).
287
+
Break up the main listing of posts on the home page across multiple pages by [enabling pagination](http://jekyllrb.com/docs/pagination/).
288
288
289
289
1. Include the [`jekyll-paginate`][jekyll-paginate] plugin in your `Gemfile`.
290
290
@@ -308,6 +308,16 @@ Break up the main listing of posts on the home page into smaller lists across mu
308
308
paginate: true
309
309
```
310
310
311
+
### Search
312
+
313
+
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`:
314
+
315
+
```yaml
316
+
search_full_content: true
317
+
```
318
+
319
+
**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.
320
+
311
321
### Taxonomy Pages
312
322
313
323
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:
These paths should mimic the permalinks used for your [**category**](#layout-categories) and [**tag archive**](#layout-tags) pages. The `#` at the end is necessary to target the correct taxonomy section on the page.
330
+
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.
321
331
322
332
For example if you were to create `categories.md` with the following front matter:
323
333
@@ -366,7 +376,7 @@ For more configuration options be sure to consult the documentation for:
366
376
367
377
## Layouts
368
378
369
-
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:
379
+
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:
370
380
371
381
```yaml
372
382
---
@@ -384,7 +394,7 @@ This layout accommodates the following front matter:
384
394
385
395
| Name | Type | Description |
386
396
| ---- | ----- | ---------- |
387
-
| `image` | String | Path to a large image associated with the post. Also used for OpenGraph, Twitter Cards, and site feed thumbnail if enabled. [Suggested sizes](#images) |
397
+
| `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). |
388
398
| `image.path` | String | Same as above. Used when a `thumbnail` or `caption` needs to be assigned to the `image` object as well. |
389
399
| `image.caption` | String | Describes the image or provides credit. Markdown is allowed. |
390
400
| `author` | Object or string | Specify a post's author `name`, `picture`, `twitter`, `links`, etc. |
@@ -465,7 +475,7 @@ differences.
465
475
* Disqus comments are omitted.
466
476
* Next/Previous post navigation links omitted.
467
477
468
-
The page layout forms the base for several other layouts like `home`, `posts`, `categories`, `tags`, and `search`.
478
+
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).
469
479
470
480
### `layout: home`
471
481
@@ -474,14 +484,15 @@ addition of the following:
474
484
475
485
```yaml
476
486
paginate: true # enables pagination loop, see section above for additional setup
487
+
entries_layout: # list (default), grid
477
488
```
478
489
479
490
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).
480
491
481
492
```liquid
482
-
{%- for entry in site.posts limit: 10 -%}
493
+
{% for entry in site.posts limit: 10 %}
483
494
{% include entry.html %}
484
-
{%- endfor -%}
495
+
{% endfor %}
485
496
```
486
497
487
498
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.
@@ -533,7 +544,7 @@ taxonomy: # category name
533
544
entries_layout: # list (default), grid
534
545
```
535
546
536
-
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.
547
+
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.
537
548
538
549
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:
539
550
@@ -553,7 +564,7 @@ taxonomy: # tag name
553
564
entries_layout: # list (default), grid
554
565
```
555
566
556
-
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.
567
+
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.
557
568
558
569
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:
559
570
@@ -566,7 +577,23 @@ taxonomy: foo bar
566
577
567
578
### `layout: search`
568
579
569
-
This layout displays a search form.
580
+
This layout displays a search form and displays related pages based on the query.
If you would like to exclude specific pages/posts from the search index set the search flag to `false` in their front matter.
585
+
586
+
```yaml
587
+
search: false
588
+
```
589
+
590
+
To index the full content of your documents set `search_full_content` to `true` in `_config.yml`:
591
+
592
+
```yaml
593
+
search_full_content: true
594
+
```
595
+
596
+
**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.
570
597
571
598
## Images
572
599
@@ -582,10 +609,10 @@ Suggested image sizes in pixels are as follows:
582
609
583
610
## Theme Text
584
611
585
-
To change text found throughout the theme copy the following
612
+
To change text found throughout the theme, copy the following
586
613
[`/_data/theme.yml`](_data/text.yml) file and customize as necessary.
587
614
588
-
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).
615
+
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).
589
616
590
617
## Navigation
591
618
@@ -693,6 +720,25 @@ By default the copyright inserts the current year, [`site.title`](#site-title),
693
720
copyright: "This site is made with <3 by *me, myself, and I*."
694
721
```
695
722
723
+
## Helpers
724
+
725
+
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.
726
+
727
+
### Responsive Embed
728
+
729
+
Embed a video from YouTube/Vimeo or any other `iframe` content that responsively sizes to fit the width of its parent.
730
+
731
+
| Parameter | Required | Description |
732
+
| --------- | -------- | ----------- |
733
+
| `url` | Yes | Video or iframe's URL e.g., `https://www.youtube.com/watch?v=-PVofD2A9t8` |
734
+
| `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. |
735
+
736
+
**Example:**
737
+
738
+
```html
739
+
{% include responsive-embed url="https://www.youtube.com/watch?v=-PVofD2A9t8" ratio="16:9" %}
740
+
```
741
+
696
742
## Migration Guide
697
743
698
744
So Simple 3 is a major rewrite of the entire theme. The most notable changes are summarized below, followed by more specific changes.
0 commit comments