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: single-post based template metabox #848

Open
talksina opened this issue Aug 10, 2024 · 7 comments
Open

Feature Request: single-post based template metabox #848

talksina opened this issue Aug 10, 2024 · 7 comments

Comments

@talksina
Copy link

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:

  • hashtags: choose preferred terms taxonomy. if current post does not have tags but "topics", let me choose the "topics" taxonomy to map as hashtags so the ap_hashtags code picks "topics" up.
  • message: it is pre-compiled with the settings given in the main activitypub settings page, but you could even add a custom text with custom hashtags if you want to, if you want to give a more engaging text in the activitypub message rather than it is in the excerpt.
  • For example JetPack has it, its metabox gives you a message field where you type what social networks will then see. Including MENTIONS.

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
Copy link
Member

pfefferle commented Aug 12, 2024

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
Copy link
Author

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
Copy link
Member

pfefferle commented Aug 12, 2024

I was also talking about posting, not replying :)

@pfefferle
Copy link
Member

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

@talksina
Copy link
Author

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
Copy link
Member

pfefferle commented Aug 12, 2024

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
Copy link
Author

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 @[email protected]
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.

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

No branches or pull requests

2 participants