Automattic / wordpress-activitypub

ActivityPub for WordPress
https://wordpress.org/plugins/activitypub/
MIT License
480 stars 71 forks source link

Feature Request: single-post based template metabox #848

Open talksina opened 1 month ago

talksina commented 1 month ago

What

Give the possibility to change Fediverse output for every single post, and enrich hashtag/taxonomy choice.

Current behaviour

Activitypub -> settings -> template. You add ap_title ap_excerpt ap_content ap_hashtags ... parameters and this model works for every post you publish. But what if you want to customize single posts with custom content? Hashtags: the ap_hashtags parameter picks up the "post_tag" taxonomy and there is no way to choose another one if available.

Requested behaviour:

Settings -> activitypub -> template has not to change. That is the standard model. But, to the post editing window, add one "ActivityPub" dialog box (meta box?) where you can customize the parameters:

Why

Putting hashtags and @-mentions in the excerpt (WordPress default excerpt) is not friendly for search engines and even for screen reader usage, especially if you are reading from a third-party app or from the home page. And as I tested, it does not work, using ap_excerpt activitypub ignores the tags and mentions I place there.

It is not necessary to tag everything for ActivityPub's hashtag reasons. For example, in a post regarding HIV-related topics I could place the hashtag "#WorldAidsDay" or "#ZeroHivStigmaDay" related to a specific yearly event. It makes no sense to have a WordPress tag, or whatever taxonomy element, for something that goes into a WordPress post published once a year. So, what I'd like to be able to do is decide for each post to customize what will be posted into federated platforms. Hope it is clear, otherwise @pfefferle knows how and where to contact me.

How

No response

pfefferle commented 1 month ago

Thanks for the request @talksina 👋

This feels very much like we did it over the last years with cross-posting. We had to do it, because it was not possible to add real tags/images/@-replies/..., so that we had to cheat a bit with templates.

But with ActivityPub it is possible to re-use everything that WordPress-Core supports, so why should we reply on the templates instead of simply adding tags (like they are meant to be), @-replies and images and the plugin tries to map it best possible to ActivityPub?!?

I would recommend you to have a look at the "WordPress Post-Format - Maps the WordPress Post-Format to the ActivityPub Object Type." setting? This tries to find the best possible mapping based on WordPress' Post-Format.

The idea with ActivityPub (that's at least my interpretation) is, to have posts as first class citizens of the Fediverse, without the need of templates. I would go even further and plan to remove the templating completely.

I am curious why you want to reply on templates instead of simply add all possible information to the post.

talksina commented 1 month ago

I'm afraid you misunderstood me - I wasn't talking about replies but about posts. I maybe don't understand something in activitypub? No, I did not mean replying to a fediverse's post but customize the presentation message for each post - btw I'll try what happens with "WordPress format" in the plugin's setting, I didn't use that anyway, because I feared it could be ruined in other fedi platforms eventually.

pfefferle commented 1 month ago

I was also talking about posting, not replying :)

pfefferle commented 1 month ago

With "cross-posting" I meant posting to closed platforms like Twitter, Facebook, ...

talksina commented 1 month ago

Damn, so maybe I didn't really understand what you meant. I was wondering if it was possible to create a post so that the first block of text (I use Gutenberg) is the presentation that fediverse users will read. Generally I publish long stories and I wouldn't like my readers to have all thousands of characters in the post's content. My goal is "title -> presentation -> possible hashtags -> shortlink. Maybe my feature request is useless and I just need to read something into the documentation? But I don't find it -maybe it's in github wiki-?

pfefferle commented 1 month ago

I totally understand and share to your needs, I simply think that templates are no longer state of the art and I am searching for alternative ways, that feel more like native blogging! I would love if the ActivityPub Plugin is simply Ubiquitous without the need of adding to much extra stuff besides the Core Settings of WordPress.

Using WordPress' Post Formats, WordPress automatically uses the Excerpt instead of the Content for Articles, because the plugin assumes that the text might be longer. For Status, Aside, ... it still uses the full Content.

So maybe we need a max-chars value, to decide when to use the Excerpt and when the Content, to not only rely on Post-Formats!?!

talksina commented 1 month ago

I have changed the post format on ActivityPub's setting. But it seems not to work as you described (title -> excerpt -> hashtags -> link). It extracts the first lines of the post. Account @network@plusbrothers.net If I set "note" as activitypub-object-format it seems to get the excerpts and stuff correctly. I really would like to distribute the best as I can but I maybe have difficulties on understanding how I have to "train" p.lugin and posts.