-
Notifications
You must be signed in to change notification settings - Fork 102
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
[RFC] Pagination feature #395
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Had an idea on how we could handle indexing on dates. We could add a field to the paginator frontmatter that is a list of either strftime or permalinks attributes (e.g. |
So we are going to eventually support indexing over
With that, how do we handle
Since the user is making their page specific to what they are indexing on, they can easily handle the type of |
Yup, I had a revelation last evening and I've implemented that :D |
My first idea was to have that managed by the
but I think your idea with strfmt fields is a better idea! But maybe not in an array, as permalink cannot be an array, can it? That gives us:
|
Except what I was talking about is not the permalink but a field for specifying what parts of the date to index over. Having to parse a permalink to guess it would be pretty complex. |
So, a new field? pagination:
include: Date
date_index: ["%Y", "%m", "%d"] |
Something like that is what I had envisioned. |
To pull off the pagination on dates discussion from this giga thread, I've created #618 And I've edited first post to put some check boxes |
After date indexing, the missing part of this RFC is sorting by weight. |
Maybe? We'd need to write up the docs and do an audit to ensure this is close enough that we won't regularly break people. |
Ok, added doc and audit to requirements :) |
Ok, so I think only the audit is to be done. I don't know how we should carry this? |
Now that we're "done", it involves doing a comparison with the other solutions:
Note: normally I don't worry about this too much but this is such a big feature, that I want us to go over it again to see what we might have missed as it got broken up or as things changed. |
Feature to paginate a collection of documents so we can avoid a landing page which is
thousands of kilometer long :p
Requirements
Initial
Index pages should be able to index by
Index pages should be able to sort by multiple factors at once:
Index page behavior
collections.<name>.pages
Index page permalinks
0
when that is the index?nil
? Like day variables when indexing by month.index=0
Potential
Narrowing and nesting
Unplanned
Index pages should be able to index by
parent::child
)?Proposal
Activation
This feature is activated in the frontmatter.
Default values and use shortcut
include
to activate indexing:Also, we can make the schema auto-adapt
pagination: true
maps topagination: All
pagination: categories
pagination: categories, tags
User-defined defaults can be set in
_cobalt.yml
by filling in thedefault
,pages.default
, orposts.default
pagination
field, just leavinginclude
asNone
to avoid activating it for all pages.
Permalink
This permalink attribute is not to be confused with the one outside
pagination
section.It defines the location of the generated indexes.
New permalink attributes specific to this context
include
: a built-in representation of the paginated conceptnum
: the index numberPaginator
Pagination would be accessible through a
paginator
object (total ripoff from jekyll'spagination v2):
Once activated, a
paginator
object replacecollection
object in liquid template.Tags
Moved to RFC https://github.com/cobalt-org/cobalt.rs/issues/549
Publication Date
Open Question
["%Y', "%m"]
would have year/month hierarchical indexes)Prior Art
Jekyll
Deprecated method
https://jekyllrb.com/docs/pagination/
Activation in
_config.yml
:Quoting the page:
Pagination V2
https://github.com/sverrirs/jekyll-paginate-v2/
Advanced sorting:
pagination trails:
Gutenberg
Paginator object:
https://www.getgutenberg.io/documentation/templates/pagination/
To activate pagination on a page:
https://www.getgutenberg.io/documentation/content/section/
Tags and categories management:
https://www.getgutenberg.io/documentation/content/tags-categories/
Hugo
https://gohugo.io/templates/pagination/
In configuration:
Activation in page:
or
The text was updated successfully, but these errors were encountered: