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

Feature Request: Comments from Mastodon #107

Closed
kdmcguire opened this issue Aug 23, 2023 · 6 comments · Fixed by #144
Closed

Feature Request: Comments from Mastodon #107

kdmcguire opened this issue Aug 23, 2023 · 6 comments · Fixed by #144
Labels
enhancement New feature or request pinned

Comments

@kdmcguire
Copy link

kdmcguire commented Aug 23, 2023

Hello! First off, I love this theme and am very grateful that you've shared it.

I've seen other people add Mastodon-powered comments to their blogs (any blogs, not necessarily Astro) and I think it's a great idea. I would try to do it myself, as I've already forked and customised the project a bit, but I am Terrible At Design and don't really know what I'm doing.

This person seems to have made it work: https://sam.pikesley.org/blog/2023/03/06/mastodon-powered-comments-in-astro/

From your comments on the search feature request, I understand that you might not want to include a Mastodon-specific comments component, but I'm curious to hear your thoughts either way.

Edit: this person has gone further and combined Mastodon comments and webmentions! https://kld.dev/adding-webmentions

@chrismwilliams
Copy link
Owner

Hi @kdmcguire, thanks, and appreciate the suggestion. Atm I'm holding off on adding stuff in except simple fixes due to astro about to hit v3.0 so I'm hoping nothing is going to break when updated. Once that's done, I will definitely circle back round and take a look at this.

@chrismwilliams chrismwilliams added the enhancement New feature or request label Aug 28, 2023
Repository owner deleted a comment from github-actions bot Oct 4, 2023
@chrismwilliams
Copy link
Owner

Hi @kdmcguire, I've created a working branch for integrating webmentions to the theme.

I'm hoping to merge it with main soon but it's quite hard to test due to lack of actual webmentions the site has. If you, or anyone else reading this, get a chance to test this out and give some feedback it would really help. I've created a blog post to accompany this which should hopefully help in setting it up.

@kdmcguire
Copy link
Author

Ah, amazing! How can I help test it? If I posted on Mastodon with a link to that post, would it appear in the 'Webmentions for this post' list?

@chrismwilliams
Copy link
Owner

chrismwilliams commented Oct 12, 2023

Thank you but unfortunately I don't think it would be picked up as brid.gy has an issue with .app domains currently. Once this is live, I'm going to have to move the theme to another domain to make it work properly, but that shouldn't be too difficult.

If you get chance, could you try and add the webmention branch to your own site (it doesn't have to be your own main branch) and send yourself a test mention and see if it works.

Don't worry if you're unable to. I'm pretty sure it works, but having very little data and a domain that isn't supported, it may have a few bugs and/or need better documentation.

Also, as explained in the linked post, a current limitation is having to rebuild the site to get fresh webmentions. I'll add a github cron job once everything is working and add the info to the post.

@kdmcguire
Copy link
Author

kdmcguire commented Oct 12, 2023

This seems to work perfectly!

https://deploy-preview-198--kieran-mcguire.netlify.app/posts/monday-ritual/

One (sort of unrelated) thing I did notice is that in astro.config.ts, you've changed the comment on line 12 to // ! Please set this to your own domain in src/site.config.ts. I don't currently see a reference to the site setting in src/site.config.ts or src/types.ts, though. (This may be incomplete, just flagging in case it's a mistake!)

@chrismwilliams
Copy link
Owner

Brilliant, thanks for letting me know.

Ah yeah apologies, that was me trying to be clever and thinking it would be easier to set everything in that file, site.config.ts. Unfortunately, astro doesn't like people doing that and blows up, I just forgot to change the comment back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants