Update theme documentation

This commit is contained in:
Michael Rose
2018-11-25 19:48:19 -05:00
parent e24e259650
commit e4af8a4036
12 changed files with 169 additions and 167 deletions

View File

@@ -7,7 +7,7 @@ single_layout_gallery:
alt: "single layout with header example"
- image_path: /assets/images/mm-layout-single-meta.png
alt: "single layout with comments and related posts"
last_modified_at: 2018-11-13T09:29:44-05:00
last_modified_at: 2018-11-25T19:45:55-05:00
toc: true
toc_label: "Included Layouts"
toc_icon: "columns"
@@ -15,7 +15,7 @@ toc_icon: "columns"
The bread and butter of any theme. Below you'll find the layouts included with Minimal Mistakes, what they look like and the type of content they've been built for.
## Default Layout
## Default layout
The base layout all other layouts inherit from. There's not much to this layout apart from pulling in several `_includes`:
@@ -28,7 +28,7 @@ The base layout all other layouts inherit from. There's not much to this layout
**Note:** You won't ever assign this layout directly to a post or page. Instead all other layouts will build off of it by setting `layout: default` in their YAML Front Matter.
{: .notice--warning}
### Layout Based and User-Defined Classes
### Layout based and user-defined classes
Class names corresponding to each layout are automatically added to the `<body>` element eg. `<body class="layout--single">`.
@@ -65,7 +65,7 @@ Outputs:
<body class="layout--splash landing dark-theme">
```
## Compress Layout
## Compress layout
A Jekyll layout that compresses HTML in pure Liquid. To enable add `layout: compress` to `_layouts/default.html`.
@@ -74,7 +74,7 @@ A Jekyll layout that compresses HTML in pure Liquid. To enable add `layout: comp
* [Documentation](http://jch.penibelst.de/)
## Single Layout
## Single layout
The layout you'll likely use the most --- sidebar and main content combo.
@@ -91,7 +91,7 @@ The layout you'll likely use the most --- sidebar and main content combo.
Assign with `layout: single` , or better yet apply as a [Front Matter default]({{ "/docs/configuration/#front-matter-defaults" | relative_url }}) in `_config.yml`.
### Wide Page
### Wide page
To expand the main content to the right, filling the space of what is normally occupied by the table of contents. Add the following to a post or page's YAML Front Matter:
@@ -102,7 +102,7 @@ classes: wide
**Note:** If the page contains a table of contents, it will no longer appear to the right. Instead it will be forced into the main content container directly following the page's title.
{: .notice--info}
### Table of Contents
### Table of contents
Auto-generated table of contents list for your posts and pages can be enabled by adding `toc: true` to the YAML Front Matter.
@@ -124,7 +124,7 @@ toc_icon: "cog"
---
```
## Archive Layout
## Archive layout
Essentially the same as `single` with markup adjustments and some modules removed.
@@ -159,7 +159,7 @@ Post and page excerpts are auto-generated by Jekyll which grabs the first paragr
excerpt: "A unique line of text to describe this post that will display in an archive listing and meta description with SEO benefits."
```
### Wide Page
### Wide page
To expand the main content to the right, filling the space of what is normally occupied by the table of contents. Add the following to a post or page's YAML Front Matter:
@@ -167,7 +167,7 @@ To expand the main content to the right, filling the space of what is normally o
classes: wide
```
### Grid View
### Grid view
Adding `type=grid` to the `archive-single` helper will display archive posts in a 4 column grid. For example to create an archive displaying all documents in the portfolio collection:
@@ -193,7 +193,7 @@ header:
**Note:** More information on using this `_include` can be found under [**Helpers**]({{ "/docs/helpers/" | relative_url }}).
{: .notice--info}
## Taxonomy Archives
## Taxonomy archives
If you have the luxury of using Jekyll plugins, the creation of category and tag archives is greatly simplified. Simply enable support for the [`jekyll-archives`](https://github.com/jekyll/jekyll-archives) plugin with a few `_config.yml` settings as noted in the [**Configuration**]({{ "/docs/configuration/#archive-settings" | relative_url }}) section and you're good to go.
@@ -284,7 +284,7 @@ permalink: /tags/foo-bar/
taxonomy: foo bar
```
## Home Page Layout
## Home page layout
A derivative archive page layout to be used as a simple home page. It is built to show a paginated list of recent posts based off of the [pagination settings]({{ "/docs/configuration/#paginate" | relative_url }}) in `_config.yml`.
@@ -321,7 +321,7 @@ paginate_path: /blog/page:num
**Note:** Jekyll can only paginate a single `index.html` file. If you'd like to paginate more pages (e.g. category indexes) you'll need the help of a custom plugin. For more pagination related settings check the [**Configuration**]({{ "/docs/configuration/#paginate" | relative_url }}) section.
{: .notice--info}
## Splash Page Layout
## Splash page layout
For full-width landing pages that need a little something extra add `layout: splash` to the YAML Front Matter.
@@ -335,7 +335,7 @@ For full-width landing pages that need a little something extra add `layout: spl
Feature blocks can be assigned and aligned to the `left`, `right`, or `center` with a sprinkling of YAML. For full details on how to use the `feature_row` helper check the [**Content**]({{ "/docs/helpers/" | relative_url }}) section or review a [sample splash page](https://github.com/{{ site.repository }}/blob/master/docs/_pages/splash-page.md).
## Search Page Layout
## Search page layout
A page with a search form. Add `layout: search` to the YAML Front Matter similar to [this example](https://github.com/mmistakes/minimal-mistakes/blob/master/test/_pages/search.md) on the test site.
@@ -401,7 +401,7 @@ header:
**ProTip:** Captions written in Markdown are supported, so feel free to add links, or style text. Just be sure to wrap it in quotes.
{: .notice--info}
### Header Overlay
### Header overlay
To overlay text on top of a header image you have a few more options:
@@ -485,7 +485,7 @@ header:
url: "#bar"
```
### OpenGraph & Twitter Card Images
### Open Graph & Twitter Card images
By default the large page header or overlay images are used for sharing previews. If you'd like to set this image to something else use `page.header.og_image` like:
@@ -504,7 +504,7 @@ header:
The space to the left of a page's main content is blank by default, but has the ability to show an author profile (name, short biography, social media links), custom content, or both.
### Author Profile
### Author profile
Add `author_profile: true` to a post or page's YAML Front Matter.
@@ -563,7 +563,7 @@ For example, to color a Reddit icon, simply add a `color` declaration and the co
![Reddit link in author profile with color]({{ "/assets/images/mm-author-profile-reddit-color.png" | relative_url }})
### Custom Sidebar Content
### Custom sidebar content
Blocks of content can be added by using the following under `sidebar`:
@@ -594,7 +594,7 @@ sidebar:
**Note:** Custom sidebar content added to a post or page's YAML Front Matter will appear below the author profile if enabled with `author_profile: true`.
{: .notice--info}
### Custom Sidebar Navigation Menu
### Custom sidebar navigation menu
To create a sidebar menu[^sidebar-menu] similar to the one found in the theme's documentation pages you'll need to modify a `_data` file and some YAML Front Matter.
@@ -683,7 +683,7 @@ defaults:
---
## Social Sharing Links
## Social sharing links
The `single` layout has an option to enable social links at the bottom of posts for sharing on Twitter, Facebook, Google+, and LinkedIn. Similar to the links found in the author sidebar, the theme ships with defaults for the most common social networks.