Improve the documentation for novice users (Tags+Categories and Pagination) (#826)
* Enhanced the documentation with some tips for the tags, categories and paginator * Enhanced the documentation with some tips for the tags, categories and paginator * Update 05-configuration.md * Update 10-layouts.md
This commit is contained in:
committed by
Michael Rose
parent
b86240b26a
commit
0b07c20c84
@@ -155,10 +155,38 @@ To produce something like this:
|
||||
|
||||
### Taxonomy Archive
|
||||
|
||||
If you have the luxury of using Jekyll plugins the creation of category and tag archives is greatly simplified. 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" | absolute_url }}) section.
|
||||
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" | absolute_url }}) section and you're good to go.
|
||||
|
||||

|
||||
|
||||
If you're not using the `jekyll-archives` plugin then you need to create archive pages yourself. Sample taxonomy archives can be found by grabbing the HTML sources below and adding to your site.
|
||||
|
||||
| Name | HTML Source |
|
||||
| -------------------- | --- |
|
||||
| [Categories Archive](https://mmistakes.github.io/minimal-mistakes/categories/) | [category-archive.html](https://github.com/mmistakes/minimal-mistakes/blob/master/docs/_pages/category-archive.html) |
|
||||
| [Tags Archive](https://mmistakes.github.io/minimal-mistakes/tags/) | [tag-archive.html](https://github.com/mmistakes/minimal-mistakes/blob/master/docs/_pages/tag-archive.html) |
|
||||
|
||||
The **Tags Archive** page that responds to urls such as `/tags/#tips` looks something like this:
|
||||
|
||||
```html
|
||||
---
|
||||
layout: archive
|
||||
permalink: /tags/
|
||||
title: "Posts by Tags"
|
||||
author_profile: true
|
||||
---
|
||||
|
||||
{% include group-by-array collection=site.posts field="tags" %}
|
||||
|
||||
{% for tag in group_names %}
|
||||
{% assign posts = group_items[forloop.index0] %}
|
||||
<h2 id="{{ tag | slugify }}" class="archive__subtitle">{{ tag }}</h2>
|
||||
{% for post in posts %}
|
||||
{% include archive-single.html %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
```
|
||||
|
||||
### Home Page
|
||||
|
||||
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" | absolute_url }}) in `_config.yml`.
|
||||
|
||||
Reference in New Issue
Block a user