New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation for `{{ page.excerpt }}` #6779

Merged
merged 2 commits into from Feb 15, 2018

Conversation

Projects
None yet
5 participants
@ashmaroli
Member

ashmaroli commented Feb 15, 2018

{{ page.excerpt }} is currently meant for Jekyll::Document objects only, and has nothing to do with Jekyll::Page objects, much like {{ page.id }} is meant to be used for documents alone.

@ashmaroli ashmaroli requested a review from jekyll/documentation Feb 15, 2018

Take the above example of an index of posts. Perhaps you want to include
a little hint about the post's content by adding the first paragraph of each of
your posts:
{% raw %}
```liquid
<ul>
{% for post in site.posts %}
{% for doc in site.posts %}

This comment has been minimized.

@oe

oe Feb 15, 2018

Member

Why change this? Makes it harder to understand for new users, IMO.

This comment has been minimized.

@ashmaroli

ashmaroli Feb 15, 2018

Member

.. so that they do not think that one should always just use post parameter for posts..

This comment has been minimized.

@oe

oe Feb 15, 2018

Member

But it does make more sense semantically to say for post in posts, doesn't it? I think this example is fine, as long as we clarify it explicitly somewhere else.

This comment has been minimized.

@ashmaroli

ashmaroli Feb 15, 2018

Member

okay.. I'll undo this change.

@pathawks

This comment has been minimized.

Member

pathawks commented Feb 15, 2018

Could we just add excerpt to Page?

Maybe default to "" and log a warning that excerpt is not calculated for pages?

@DirtyF

DirtyF approved these changes Feb 15, 2018

@pathawks

This comment has been minimized.

Member

pathawks commented Feb 15, 2018

@jekyllbot: 🚢 +docs

@jekyllbot jekyllbot merged commit 7040d26 into jekyll:master Feb 15, 2018

3 checks passed

WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ashmaroli ashmaroli deleted the ashmaroli:excerpt-docs branch Feb 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment