tantek / post-type-discovery

Post Type Discovery editor's draft
https://ptd.spec.indieweb.org/
Creative Commons Zero v1.0 Universal
7 stars 4 forks source link

Do we need a "is this a post at all" discovery? #5

Open kevinmarks opened 8 years ago

kevinmarks commented 8 years ago

What if the page is a feed of posts, will it then recognize the first post? What if the page is a profile page that shows posts on it?

gobengo commented 8 years ago

Ostensibly if you're running this on a page, you also should look for an h-feed or whatever. Then for each item in there, apply post-type-discovery?

dissolve commented 8 years ago

Its a question really outside of the spec i think, this is on how the implementer decides to accept a claim as valid. Perhaps a note to say source SHOULD be the permalink.
Implementation wise you may want to just dismiss anything that has an h-feed as the first top-level item.

tantek commented 8 years ago

Agreed with @dissolve. I'll add some scope text to the spec to say the algorithm applies to permalinks / single posts, and that detection of a single post from an arbitrary page is left up to the implementation.

Re-reading the algorithm from the start:

"The Post Type Discovery algorithm ("the algorithm") discovers the type of a post given a data structure representing a post with a flat set of properties"

Note that the algorithm starts with the precondition of "given a data structure representing a post", and does not refer to a "page" or "URL" etc.

Going from a "page" or "URL" to a "a data structure representing a post" is currently outside the bounds/scope of this spec, and I think that's correct.

Thus how an implementation gets that "data structure representing a post". I.e. I believe how an implementation reads a page/URL and finds a post and parses it into "a data structure representing a post" is outside the scope of this spec and we don't need to state it. That would be a "Post Discovery" algorithm, which we could consider adding, but that would expand the scope of the spec.

Commenters, please indicate if this conclusion is ok with you (no changes needed), or if you think Post Type Discovery should (as a spec) also provide an algorithm for Post Discovery, please file a new issue, requesting that explicitly as a new feature of this specification (because it really is a whole new feature, and not a problem with the existing features).

tantek commented 6 years ago

I would like to close this issue without needing any changes to the spec, and instead, brainstorm a "Post Discovery" algorithm on wiki page separately as noted in the previous comment.