Miraz
Miraz

Thanks to @shindakun and the clearly written tutorial at Adding Webmentions To micro.blog I believe Iā€™ve now successfully added Webmentions to this blog. šŸ¤žšŸ¼

|
Embed
Progress spinner
shindakun
shindakun

@Miraz awesome! I do need to tweak some small bits but I'm glad what's there already has been helpful!

|
Embed
Progress spinner
shindakun
shindakun

@shindakun might need to add some CSS for profile pictures.

|
Embed
Progress spinner
manton
manton

@Miraz Wow, I can't believe I missed thatā€¦ It looks great, thanks @shindakun!

|
Embed
Progress spinner
Miraz
Miraz

@shindakun Iā€™ve done some CSS and other tweaks and have it looking more to my liking. I'd like to get rid of the Like and Share buttons totally, but when I removed them from the HTML everything broke. šŸ˜’ meanwhile I'm hiding the text. I also rearranged a couple of items. So pleasing. Thank you again.

|
Embed
Progress spinner
shindakun
shindakun

@Miraz Yeah I've been thinking about getting rid of the buttons myself. If you remove the label section near the top of the "render" functions that should allow you to remove the HTML for the buttons. For example:

var label = reposts.length + (reposts.length === 1 ? ' share' : ' shares'); document.getElementById('share-count').innerHTML = label;

|
Embed
Progress spinner
shindakun
shindakun

Thanks @manton adding something other then webmentions seemed wrong somehow lol. The online theme editor made it pretty easy to step through the process too.

|
Embed
Progress spinner
Miraz
Miraz

@shindakun Thank you! Removed and removed. šŸ˜€

|
Embed
Progress spinner
matpacker
matpacker

@Miraz I tested sending a webmention from my external blog, it didn't seem to come through despite it appearing on micro.blog. I wonder what's going on, I'm guessing I didn't link it correctly or something.

|
Embed
Progress spinner
Miraz
Miraz

@matpacker I've been outside for a couple of hours. Looks like my most recent edit to the files has broken itā€¦ Iā€™ll look at it again tomorrowā€¦

|
Embed
Progress spinner
shindakun
shindakun

@Miraz Ack! Looks like I left out <ul class="shares" id="shares"></ul> in the HTML on the post. I also noticed I didn't mention that you need to supply an image for shares. The code looks for /images/anon-avatar.png by default.

@matpacker There is something odd about the post that webmention.io recieved, looking at the JSON returned to the page its coming in as:

"sentence_html": "<a href=\"[www.mathewpacker.com/2019/12/2...](https://www.mathewpacker.com/2019/12/2523/)\">someone</a> posted '' linking to <a href=\"[miraz.me/2019/12/2...](https://miraz.me/2019/12/21/thanks-to-shindakun.html)\">[miraz.me/2019/12/2...](https://miraz.me/2019/12/21/thanks-to-shindakun.html)</a>" So, it knows you send something just doesn't appear to have written the text.

Thanks for testing that, I had completely forgotten about it.

|
Embed
Progress spinner
matpacker
matpacker

@shindakun Curious! I'm using WP with the webmentions plugin, I've just updated the post with more information added to the response property, I wonder if it's sent the update message and if there's any additional info in it.

|
Embed
Progress spinner
shindakun
shindakun

@matpacker Hmm doesn't look like it's updated in the data sent back to the page (at least not yet). I haven't used that plugin, so I don't know to much about how its sending to webmention.io that mention definietly is much ligher on details then the ones from micro.blog. I wonder if that's why the original implmentation I based my post on only shows a name and profile icon for "shares". Though the other examples of them I found do appear to have comment text. Maybe the issue is specific to the plugin, can't install it on the free wordpress.com account. :(

|
Embed
Progress spinner
toddgrotenhuis
toddgrotenhuis

@Miraz @manton should this just be default (or an option to turn on in your account settings) for hosted blogs?

|
Embed
Progress spinner
stefp
stefp

@Miraz I've been trying this out myself. Webmentions are working but they're not being shown and the buttons don't do anything. A bit more tweaking might be needed for my theme.

|
Embed
Progress spinner
manton
manton

@bix Yes, I think you're right. If you switch to using another Webmention endpoint, Micro.blog will know about Micro.blog replies but not necessarily external replies (unless they are also sent to Micro.blog, which I think a couple bloggers do).

|
Embed
Progress spinner
manton
manton

@toddgrotenhuis We plan to have a built-in feature that can do something similar in the future, so I wouldn't want everyone to have to switch later. But it's an option for people who need that functionality right now.

|
Embed
Progress spinner
pratik
pratik

@shindakun Will you be updating your original post? I've favorited it and plan to add webmentions to my mb in a few days. So I'm glad people have started testing it out :)

|
Embed
Progress spinner
shindakun
shindakun

@pratik yup the plan is for some more updates today. Think I'm going to take the buttons out completely the original implementation only would show one type of mention at a time but I don't think that's necessary.

|
Embed
Progress spinner
Miraz
Miraz

@stefp I had it working yesterday, then tweaked something and it broke. Even after undoing the tweaks I canā€™t seem to get it working again. šŸ˜’

|
Embed
Progress spinner
JohnPhilpin
JohnPhilpin

@shindakun @miraz ... ok Thankyou both inspired to try .... again!

|
Embed
Progress spinner
shindakun
shindakun

@Miraz I'll take a peak and see if I can spot the issue.

|
Embed
Progress spinner
shindakun
shindakun

@Miraz it looks like you should be alright once you add the "shares" <ul> Screen Shot 2019-12-21 at 11 33 06 AM.

It got left out of the HTML in my original post by mistake, it should have included three elements:

html &lt;ul class="replies" id="replies"&gt;&lt;/ul&gt; &lt;ul class="likes" id="likes"&gt;&lt;/ul&gt; &lt;ul class="shares" id="shares"&gt;&lt;/ul&gt;

|
Embed
Progress spinner
Miraz
Miraz

@shindakun Thank you. Webmentions are now appearing. The thing is, they're appearing again. They did work yesterday, then stopped with my messing about. Anyway, there are now a load of mentions on the post. Thanks again!

|
Embed
Progress spinner
matpacker
matpacker

@Miraz so, my blog has sent 3 webmentions now, no text has come through from any of them, Iā€™ve sent 2 of them using the response properties fields that the Post Kinds WP plugin adds, and the other was sent using @aaronpkā€˜s Quill app.

FYI @shindakun

|
Embed
Progress spinner
stefp
stefp

@Miraz I've managed to get it working after a lot of fiddling around. The problem was the path to the javascript file was wrong. I think I just found the right one by luck :)

|
Embed
Progress spinner
Miraz
Miraz

@stefp Maybe it's a theme thing. Mine is working (now), mainly.

|
Embed
Progress spinner
shindakun
shindakun

@matpacker hmm that stinks. :( Wonder webmention.io is not reciving something it expects? I don't really have a good way to test that but I'll try and come up with something.

|
Embed
Progress spinner
matpacker
matpacker

@shindakun yeh, itā€™s an odd one, got a couple of other things to test before leaving it for today.

|
Embed
Progress spinner
In reply to
smokey
smokey

@Miraz I just finally clicked over to see it on your site, and it looks sharp šŸ‘šŸ‘

|
Embed
Progress spinner
Miraz
Miraz

@smokey šŸ˜Š

|
Embed
Progress spinner
pratik
pratik

@Miraz They look great and I see them when I click thru to a single page. Have you deliberately kept any indications of comments being present from the homepage? @smokey

|
Embed
Progress spinner
Miraz
Miraz

@pratik Yes, I think the thing is designed to only go on pages for single posts. Imagine if a Home page had dozens of 'comments' on each post. I wouldn't like that much.

|
Embed
Progress spinner
smokey
smokey

@bix @Miraz @pratik I believe the JS to talk to webmention.io keys off of the current URL, so on the homepage itā€™d just show everyone whoā€™s ever sent a webmention to the homepage.

I imagine a variant could be written that finds the permalink URL for every post on a page and then goes and asks webmention.io for a count, for each post, and displays that with the post on the homepage, but itā€™s probably that much more complexā€¦.

|
Embed
Progress spinner
pratik
pratik

@smokey @bix @miraz Yes, thatā€™s what I meant. A count of webmentions and not the actual webmentions on the front page. Much like the traditional comments on blogs.

|
Embed
Progress spinner
Miraz
Miraz

@bix I imagine there could be. I'm happy to keep the home page clean though.

|
Embed
Progress spinner
Miraz
Miraz

@smokey Ahhh. Good to know thanks. I'm very happy to keep a 'clean' home page.

|
Embed
Progress spinner
smokey
smokey

@pratik @bix ā€¦Although maybe not that much more complex, since @shindakunā€™s original JavaScript implementation already had the counting stuff (as seen on @Mirazā€™s site)ā€¦youā€™d just have to look for the URLs differently (looping through all the posts on the page), grab the count(s) for each URL, and put them in a different div placeholder, and then youā€™d have counts with each post on the homepage. So maybe 80% of the JS is the same?

|
Embed
Progress spinner
smokey
smokey

@matpacker @shindakun I just noticed that Mirazā€™s post is reporting ā€œ4 sharesā€ (and wondered what they wereā€¦), which coincidentally corresponds to 4 ā€œspeaking headā€ icons from mathewpacker.com, so webmention.io is seeing them as shares and not replies, I guessā€¦if that helps any in debuggingā€¦.

|
Embed
Progress spinner
matpacker
matpacker

@smokey turned out to be a caching problem, Iā€™ve had @Miraz comment on something I shared earlier today and all went through correctly. I have reciprocal blank heads on a post on my site.

|
Embed
Progress spinner
smokey
smokey

@matpacker Ah, good šŸ‘

|
Embed
Progress spinner