-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Improve collections docs #5691
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
Improve collections docs #5691
Conversation
See #5630 for more details on the update. @jekyll/documentation @DirtyF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not very sure why you changed e.g.
to for example
. Seems like just a personal preference.
But there are some other suggestions you may have to consider
@@ -7,12 +7,18 @@ permalink: /docs/collections/ | |||
Not everything is a post or a page. Maybe you want to document the various | |||
methods in your open source project, members of a team, or talks at a | |||
conference. Collections allow you to define a new type of document that behave | |||
like Pages or Posts do normally, but also have their own unique properties and | |||
like Pages or Posts do normally but which also have their own unique properties and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, this change is wrong..
Collections allow you to define a new type of document that behave like Pages or Posts do normally but which also have their own unique properties..
just doesn't flow well..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, changed it back.
documents. YAML Front Matter is read in as data if it exists, and everything | ||
after it is stuck in the Document's `content` attribute. If no YAML Front | ||
after it is available in the document's `content` attribute. If no YAML Front |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- after it is available in the document's `content` attribute.
+ after it, is accessible via the document's `content` attribute. (e.g. `{{ post.content }}`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
## Liquid Attributes | ||
|
||
### Collections | ||
|
||
Each collection is accessible via the `site` Liquid variable. For example, if | ||
Each collection is accessible through the `site` variable. For example, if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👎 on changing via
to through
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"via" and "e.g." and other Latinates are discouraged in technical style guides (such as the Microsoft Manual of Style). They may be familiar in the U.S., but for non-native speakers in other countries reading English, Latinates introduce more complexity. of course it's somewhat trivial here. seems like both are equally readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either. Latinates will be very understandable to folks who speak Latin-derived languages, but may prove a barrier for many others. Perhaps removing this sentence altogether and replacing it with:
Each collection is accessible as a field on the
site
Liquid variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't mean to cause fuss over a point that matters so little. the benefit of latin abbreviations is that they do save space, and developers like things as brief as possible usually.
Made minor grammar updates
I made the requested updates. Submitting for re-review. |
@@ -51,7 +51,7 @@ defaults: | |||
|
|||
Create a corresponding folder (for example, `<source>/_my_collection`) and add | |||
documents. YAML Front Matter is read in as data if it exists, and everything | |||
after it is available in the document's `content` attribute. If no YAML Front | |||
after it is accessible via the document's `content` attribute. If no YAML Front |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i had also suggested a comma following "after it": after it, is accessible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
putting a comma between a noun ("everything") and a verb ("is") would make this grammatically incorrect. https://www.grammarly.com/handbook/punctuation/comma/4/comma-with-subjects-and-verbs/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to continue arguing over this.. just one last attempt..
Read through the following:
"Everything after it is available online"
— this denotes a point-in-time after something is available online. (the noun is just Everything
)
"Everything after it, is available online"
— this denotes a point-in-time right now and beyond. (the noun is Everything after it
referring to whatever there is, after the object it
. (it == FrontMatter dashes in our original context.)
Upvote if I'm in the right, else downvote. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, i just don't see the logic there. if you were omitting words, then the comma could work. Such as, "YAML Front Matter is read in as data if it exists, and everything
after, in the Document's content
attribute." In that case, the "," stands for "is read in as."
There is also a slight pause in your phrasing, so I can see why you might wan 8000 t a comma there to indicate the pause.
I think the overall sentence is a little janky anyway. The problem is that "it" is ambiguous (does it refer to Front Matter or data -- at first read, it's not all that clear), and there are 2 "it" references.
Here's how I would fix that:
Create a corresponding folder (e.g.
<source>/_my_collection
) and add
documents. YAML front matter is processed if the front matter exists, and everything
after the front matter is pushed into the Document'scontent
attribute. If no YAML Front
Matter is provided, Jekyll will not generate the file in your collection.
I think "read in as data" is kind of vague, and "is stuck into" is also an odd word choice. Do you like this new paragraph better, or should I keep it as is?
I don't mean to bikeshed this point. Probably doesn't matter a whole lot either way. I'll commit this update and you can downvote it if you hate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see how many times you repeated front matter
..? it
was used as a preposition pronoun for the same front matter
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only repeated it to avoid the ambiguity. Feel free to change this sentence to make it read how you think it sounds best. I'm actually heading out of town for a few days, so my communication will be spotty. (I didn't want to bring up capitalization issues with Front Matter versus front matter, or document versus Document, but I'll try to include something in a style guide at some future point so we maintain consistency.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again! Just a few comments here.
collections: | ||
my_collection: | ||
output: true | ||
permalink: /awesome/:path/:title.output_ext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:title.:output_ext
here – there is a colon missing between the .
and the o
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
## Liquid Attributes | ||
|
||
### Collections | ||
|
||
Each collection is accessible via the `site` Liquid variable. For example, if | ||
Each collection is accessible through the `site` variable. For example, if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either. Latinates will be very understandable to folks who speak Latin-derived languages, but may prove a barrier for many others. Perhaps removing this sentence altogether and replacing it with:
Each collection is accessible as a field on the
site
Liquid variable.
I made the updates here. |
Just checking, are you waiting on me for anything related to this PR? I'd like to see all my PRs either get merged or closed, rather than go stale. |
/cc @parkr |
@jekyllbot: merge +site |
See #5630 for more details on the update.
@jekyll/documentation