-
Notifications
You must be signed in to change notification settings - Fork 18
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
add option to advertise endpoint in <a> tag instead of <link> #32
Conversation
inspired by wordpress.com
nice idea! doesn't wordpress allow to add links at all? the html5 spec allows adding |
sadly no, wordpress.com doesn't allow |
never mind... adding a |
Haven't touched WP in ages, but shouldn't adding the <link> tag be done in the theme or a plugin? What's the use case for doing this in posts, pages, and/or widgets where the restriction exists? In general I'm ok with the idea of doing this with <a> tags, but have apprehensions in terms of complexity for parsers/clients? Also, I don't like the idea of mentioning Wordpress limitations in the spec and if this is really required might prefer wording it differently. |
hey sandeep! thanks for the reply. this is wordpress.com, not self-hosted wordpress. wordpress.com doesn't allow custom themes or plugins. examples are useful in specs, so i mentioned it as an example of the motivation. if you'd rather drop the wordpress.com mention, i'm ok with that. ...and discussion in irc seemed to agree that this wasn't too much of an additional imposition on parsers/clients. here's an example of a small modification to an existing client to support it: Ryuno-Ki/webmention-tools@f29879a |
Ah, I missed the .com :) We could make the change generic for silo's (no support for http headers or link tag). This now also brings up the question of precedence. For example, if Wordpress.com decided to support webmention by publishing a link header and link tag, which might be different from the a tag published by the user, which one would take precedence? (the problem also exists between link header and link tag) |
FYI, Pingback gives precedence to the (X-Pingback) header over the <link> element. Maybe, Header > Link element > A element? With the cited wordpress.com example, this might not be ideal as it will override the users preference and use the wordpress.com endpoint. |
It looks like the spec might not allow this depending on how it's interpreted. For example how do you interpret an a element with the rel webmention in the footer/sidebar of the page that has a post. @snarfed, @tantek, @aaronpk, @barnabywalters: What do you think? (See also previous 2 comments about precedence) |
all good points. thanks for bringing them up! I don't know that any of them rules this out entirely, but they're definitely worth thinking through. Header > link > a makes sense to me. yes, in your example, WordPress.com would override individual users, but it's just a hypothetical, and I'm ok with a different ordering if we want. I'm also personally ok with the slight skew from the letter of the law in the html spec. my only real goal is to find a way for WordPress.com users to allow incoming webmentions. if we come up with a different idea that we prefer, I'd probably be fine with that too! |
Agreed with headers > link > a. Also agreed with not mentioning WordPress limitations by name in the spec - that kind of information quickly gets dated (and is a pain to maintain). Re: the HTML5 spec re: - it's true that in the past (e.g. in microformats) we tried to scope to specific elements, but in practice that has not worked out (with the exception of rel=tag for a few years). We've dropped use of rel inside microformats and now only to apply to page level relationships (hence why the microformats2 parser spec puts them all into one document wide collection). That part of the HTML5 spec is trying to say: - always applies to the whole document - may apply to some context in the document, or the whole document.Modern usage is now to only use <* rel> for the whole document. I should probably file a bug on the HTML spec (am in the W3C HTML WG). |
Finally, I think the requirement to parse the a element for rel's by clients should be a MUST to ensure it is equivalent to the other methods. So final mods are:
I'll try to make these changes later today. Feel free to edit this PR if you get to it before me. |
…ntion based on review feedback. thanks @sandeepshetty, @tantek!
done! i'm happy to defer to you all on specific language here. feel free to request changes or merge and make them afterward, either works for me. |
Added option to advertise webmention endpoint in <a> tag
Thanks @snarfed. |
inspired by wordpress.com. background discussion: http://indiewebcamp.com/irc/2014-05-04/line/1399225703
thanks in advance, @sandeepshetty! cc @kylewm, @aaronpk, @barnabywalters