Feature: Introductory text for autopages, etc. #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements an "intro" feature as discussed in #58.
Given the following in
_config.yml
:creating a file with the name "intro.md" (or ending in "-intro.md") would insert that file as the introductory text for a collection, posts, etc. according to its location and/or filters (categories, tags, etc.). The file would be fully rendered (Liquid and Markdown) where the following is placed:
{{ paginator.intro }}
Using this could be as simple as dropping an "intro.md" into a collections folder, but the general rule is, as long as you can get an entry to appear uniquely in a pagination page/autopage, you can use it as an intro simply by renaming it and removing its
layout:
, if necessary.For example,
examples/03-tags/_romance
could have a filehistrom-intro.md
as follows:and it will be rendered like so after adding
{{ paginator.intro }}
to_layouts/autopage_collection.html
:This also works for posts. Adding
{{ paginator.intro }}
toexamples/01-typicalblog/_layouts/home.html
and creating_posts/0000-00-00-main-intro.md
as follows:would render as follows: