Skip to content
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

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

Open
kevinmarks opened this issue Dec 8, 2015 · 4 comments
Open

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

kevinmarks opened this issue Dec 8, 2015 · 4 comments

Comments

@kevinmarks
Copy link

kevinmarks commented Dec 8, 2015

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
Copy link

gobengo commented Dec 8, 2015

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
Copy link

dissolve commented Dec 8, 2015

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
Copy link
Owner

tantek commented Dec 15, 2015

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
Copy link
Owner

tantek commented Dec 19, 2017

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.

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

No branches or pull requests

4 participants