At IndieWebCamp Amsterdam I finally implemented unlisted posts for my website! This has been on my list for a while, and is a prerequisite for being able to do fancier things like posting full photo albums to my site, so I decided to take the plunge and finally get this done.
There has been some brainstorming about this for other Micropub clients and servers already, which was a very helpful start.
I made a couple decisions about how this should work on my site that I am not necessarily completely set on. I wanted to document this before I forget and look back at my code months later and think "why did I do it this way?"
On my website, an "unlisted" post:
- Does not show up on my home page, or any "channel" page like /notes or /articles
- Does not show up on date or month permalinks
- If the post is tagged, it does not show up on the tag pages
- The post will still show up in searches
- The post will still send webmentions for any links in the post
- The post will not be delivered to my ActivityPub followers at all
- The post still uses my same URL scheme, which uses sequential numbers after the date, so these unlisted posts are still enumerable
That last point is very intentional. I don't want to accidentally start treating unlisted posts as a form of access control. I don't want to pretend they are not public. If I had used some sort of longer non-enumerable string in the URL, then it has the risk of looking like a secret URL, and I may be tempted to treat it as a form of private post. Instead, I want to implement private and protected posts as truly protected by requiring the viewer to log in to view them.
I'm on the fence about whether unlisted posts should show up in search. My reasoning is that the act of typing in a search term means you're looking for a particular thing, which is very different from browsing my home page or even tag pages. On the other hand, YouTube implements unlisted posts by making them truly not discoverable unless you know the URL (hidden from search, lists, recommendations, etc). I think I'll leave it like this and see if I'm comfortable after using it for a while.
Implementing this on my site wasn't very hard, because I had quite a bit of ground work laid already. The interesting thing was the cascade effect it had once I wanted to go and actually post an unlisted post. I decided to add a dropdown to Quill, the app I use to post most of my content on my site. However, since many other people use this app too, I didn't want to just add this dropdown if other websites won't recognize the field. So I had to add a mechanism to Quill to ask your website whether it supports unlisted posts.
We have some precedent in Micropub with this kind of thing around querying the Micropub endpoint for which kinds of posts it supports. Quill uses this to disable some of the posting interfaces for servers that don't support those kinds of posts. Micro.blog added this earlier this year so that if you're using Quill with Micro.blog, you will only see the posting interfaces that Micro.blog can handle.
This is the new dropdown in Quill:
If your Micropub endpoint returns "visibility" in the config query, then Quill will show this new dropdown in the note interface!
Special thanks to @sebsel for talking through some of this brainstorming with me during IndieWebCamp!