Open krusynth opened 2 months ago
Yeah, I think adding rel="next"
and rel="previous"
to navigation links you have on such a summary page would work. microformats2 parsers will extract those in the rels
and rel-urls
.
I'm not sure if any consumers of h-feed use those rels yet, but experimentation is welcome!
<div class="h-feed">
<div class="h-entry">
<h1 class="p-name">A post</h1>
</div>
</div>
<a href="/next" rel="next">Next</a>
parsed:
{
"items": [
{
"type": [
"h-feed"
],
"properties": {},
"children": [
{
"type": [
"h-entry"
],
"properties": {
"name": [
"A post"
]
}
}
]
}
],
"rels": {
"next": [
"/next"
]
},
"rel-urls": {
"/next": {
"text": "Next",
"rels": [
"next"
]
}
},
"debug": {
"package": "https://packagist.org/packages/mf2/mf2",
"source": "https://github.com/indieweb/php-mf2",
"version": "v0.5.0",
"note": [
"This output was generated from the php-mf2 library available at https://github.com/indieweb/php-mf2",
"Please file any issues with the parser at https://github.com/indieweb/php-mf2/issues",
"Using the Masterminds HTML5 parser"
]
}
}
In most cases, it's very likely that an h-feed list of entries on a page is on a summary page - like a homepage list of recent posts, or a category page of posts, etc. In those cases, there's almost always pagination on the page, and the posts are a subset of the total collection. I assume we need some sort of
rel="next"
orrel="previous"
markup for links here?I apologize if I've missed an existing solution here!