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

Add 'syndication' as link type to receive webmention. #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kixiQu
Copy link

@kixiQu kixiQu commented Jul 18, 2020

Sites like https://indieweb.xyz and
https://news.indieweb.org use a webmention sent
for a link with "u-syndication" indicated, see:
https://indieweb.xyz/howto/en
and
https://news.indieweb.org/how-to-submit-a-post
It's possible that this would be a good moment
to reexamine whether there are other classes of
link that merit inclusion here, but this change
is limited to what I know would be useful for a
user of the service (i.e., me).


I think this might be my first Github PR? Please let me know if there's anything I can do to make this an acceptable change.

Sites like https://indieweb.xyz and
https://news.indieweb.org use a webmention sent
for a link with "u-syndication" indicated, see:
https://indieweb.xyz/howto/en
and
https://news.indieweb.org/how-to-submit-a-post
It's possible that this would be a good moment
to reexamine whether there are other classes of
link that merit inclusion here, but this change
is limited to what I know would be useful for a
user of the service (i.e., me).
@remy
Copy link
Owner

remy commented Jul 19, 2020

Thanks for sending this through. We you able to test the code with this code or is it a change in theory?

@kixiQu
Copy link
Author

kixiQu commented Jul 19, 2020 via email

@kixiQu
Copy link
Author

kixiQu commented Jul 20, 2020

With change:

$ ./bin/wm.js https://maya.land/2020/07/18/test-post-2-fast-2-furious.html --debug
limit = 10
send = false
Fetching https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
Content has microformats
entries = 1
mentions = 1
URLs to check: 1
endpoints = 1
endpoints-resolved = 1 {"source":"https://indieweb.xyz/en/hottubs","endpoint":{"url":"https://indieweb.xyz/webmention","type":"webmention"}}
Webmention endpoint found: [{"url":"https://indieweb.xyz/en/hottubs","source":"https://indieweb.xyz/en/hottubs","endpoint":{"url":"https://indieweb.xyz/webmention","type":"webmention"}}]
source = https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
target = https://indieweb.xyz/en/hottubs
endpoint = https://indieweb.xyz/webmention (webmention)

without change:

$ ./bin/wm.js https://maya.land/2020/07/18/test-post-2-fast-2-furious.html --debug
limit = 10
send = false
Fetching https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
Content has microformats
entries = 1
mentions = 0
URLs to check: 0
endpoints = 0
No webmention endpoints found on 1 entries found (try increasing with --limit N)
@kixiQu
Copy link
Author

kixiQu commented Jul 20, 2020

Originally the body of my post linked to indieweb.xyz which caused me some confusion because this line selected the body link not the syndication link, so the body link did not have the webmention endpoint attached to it. Separate issue, though.

@kixiQu
Copy link
Author

kixiQu commented Aug 12, 2020

Let me know if there's anything else you need here.

@benjifs
Copy link

benjifs commented Nov 8, 2022

I noticed this as well while trying to automate sending webmentions to brid.gy.

As mentioned in #50, if the syndication links are inside of e-content then the link is captured correctly. Because the syndication links are typically outside of e-content similar to replies, bookmarks, etc, it makes sense to add it as shown in PR #31.

Expected working version
https://www.benji.dog/notes/1667940289/

<article class="h-entry">
    <details hidden>
        <div class="p-author h-card"><!-- ... --></div>
        <a class="u-url" href="/notes/1667940289/"></a>
        <a rel="syndication noreferrer" class="u-syndication" href="https://brid.gy/publish/mastodon"></a>
    </details>
    <div class="e-content">
        <p><!-- ... --></p>
    </div>
    <footer><!-- ... --></footer>
</article>

Current working version
https://www.benji.dog/notes/1667939162/

<article class="h-entry">
    <details hidden>
        <div class="p-author h-card"><!-- ... --></div>
        <a class="u-url" href="/notes/1667939162/"></a>
    </details>
    <div class="e-content">
        <p><!-- ... --></p>
        <details hidden><a rel="syndication noreferrer" class="u-syndication" href="https://brid.gy/publish/mastodon"></a></details>
    </div>
    <footer><!-- ... --></footer>
</article>
@aciccarello
Copy link

In a HWC, someone recommended sending mentions for all u-* urls. This would also work with u-bridgy-fed urls.

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