wordpress-activitypub
wordpress-activitypub copied to clipboard
[Request] Recognise arbitrary hashtags in template
Thank you for your work on this! I think ActivityPub is very important, and I'm stoked to see it starting to be integrated with WordPress.
I run a few different sites for specialty interests, and I'm noticing that the tags I use to organise content in the context of the site, are different to how I'd want to hashtag things on the fediverse in general.
For example, for my D&D4e homebrew site: within the site I use tags like "character building" and "errata" and "theme", which are pretty useless as, say, Mastodon hashtags. And if people looked for this kind of content on a service like Mastodon, they'd probably be searching for something like #DnD4e or #DnD4eHomebrew—which would of course be useless as WP tags, since every post on my site would have them.
I thought, why not just add hashtags to the output template? So I did. Unfortunately they don't seem to be converted to actual hashtags by the time they reach my feed—just plain text. It's a bit hard to tell on dark theme, but below you can see an example with two WP tags (which became links as expected) and then two arbitrary hashtags (which didn't).
(I suspect I could use an <a> tag if I knew the right way to express the URI, but of course I don't! If that's simple to do I'd much appreciate anybody who can tell me.)
Anyway, any chance we could get the plugin to recognise arbitrary hashtags used in the template, and output them as such?
Can you share a sample post? so I can have a look?
You mean like a link to a live post? Sure, here's the example from my original post, as published on the site: https://squarefireballs.invincible.ink/how-to-be-inu-yasha/
My template is currently set up like this, so you can see what I was trying to do.
<p>New post: [ap_title]</p>
[ap_excerpt]
<p><a href="[ap_permalink]">[ap_permalink]</a></p>
#DnD4e #DnD4eHomebrew
(I took out the WP hashtags from the template after the post above was published.)
should be fixed now, please re-open if not!
(Looks like I can't reopen the issue, let me know if you want me to open a new one instead)
Unfortunately, it looks like it still not happening. I gave it a bit of time to be sure, but tags in the template are still just plain text when viewed from my Mastodon account.
In case it helps, here's the latest post that went up just now: https://squarefireballs.invincible.ink/the-vampire-sucks/
Federated as a blog @[email protected] using this template:
<p>New post: [ap_title]</p>
[ap_excerpt]
<p><a href="[ap_permalink]">[ap_permalink]</a></p>
#DnD4e #DnD4eHomebrew
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I don't suppose there has been any further progress on this? If there's anything I can do to help test I'm very willing.
I would prefer to do away with the templates altogether... They are far too complicated and don't offer as many functions as they should...
I sure hope not, since I rely on them to present articles the way I prefer :\ That would be a big downgrade for me. What would be the alternative/default behaviour?
You could create a Synced Pattern (reusable block), and either add it to your posts manually, or create a Block Template to auto insert the synced pattern to new posts.
Wouldn't that change the post content though? That would defeat the point. The goal is to provide information that would be useless to people viewing the post on the actual website, but is useful to people viewing the post from a difference fediverse context, like Mastodon.
The idea of hashtags is, that the posts will be found under that hashtag and not every app/platform handles hashtags the same way, mastodon does, so there might be apps that link to the tag page of your site which would show a 404 in that case.
You could hook into activitypub_the_content filter and markup the hashtags, but I agree with Matthias this would be hacky and not necessarily supported by all mastodon clients, or other ActivityPub servers.
The idea of hashtags is, that the posts will be found under that hashtag and not every app/platform handles hashtags the same way, mastodon does, so there might be apps that link to the tag page of your site which would show a 404 in that case.
Ahh, I see why that would be so much more difficult than it appears on the surface.
Really I guess it's part of a larger conflict, where by nature ActivityPub wants share the actual content, but something like Mastodon doesn't really use that well, so it wants more of a "summary" format. Which leads to a situation like this, where I'm effectively trying to replace a Twitter update auto-poster, and it has me thinking about AP in a way it isn't really meant for. Still a real shame—the first bit of advice to new Masto users is typically "follow hashtags to build a feed you enjoy", so not being able to handle them within context is super frustrating—but now it's clear that this is a property of AP at large, rather than this project.
Okay, so, a potentially useful compromise; what about letting [ap_hashtags] take an argument to use any taxonomy, instead of working only with tags? The terms would have to exist on the site, so that should do away with the question of how to handle arbitrary hashtags. But, you'd have the option to choose a custom taxonomy if you want to keep actual tags relevant to local browsing.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.
