A colleague asks, is there a way to reference a single paragraph in federated wiki?
A site, slug, and item id will uniquely identify a paragraph in wiki but that is not enough to display it.
In order to fetch it you have to figure out what protocols are used by the site. Normally we probe the site and handle errors in order to decide this.
In order to display the item we need to interpret the item's type. If type paragraph this is easy. If type markdown you will need a markdown formatter for the dialect of markdown used by the site. It is possible to fetch the markdown plugin from the site but it may not be able to run the plugin in isolation.
.
For example,
given site: fed.wiki given slug: text-and-video-chats given id: 8dec790751483c63
This command when run,
curl -sL fed.wiki/text-and-video-chats.json |\ jq '.story[]|select(.id=="8dec790751483c63")|.text'
Retrieves and displays,
"Our open video chats were founded for two different specific purposes using two different zoom addresses. Both have now evolved to be a handful of regulars and a welcome visitor or two sharing demos, diagnosing problems, discussing new or related software and getting to know visitors. Chats run for two to three hours with participants dropping in or out as their schedules allow."
.
We can capture a site and slug as a Reference item.
Federated wiki developers and users meet twice a week by video chat and all day every day by text chat.
We can also just drag our example paragraph into this page which will capture the id in the item and the title in the journal. We can mutate this item into a Reference and then put the paragraph text into that item.
Our open video chats were founded for two different specific purposes using two different zoom addresses. Both have now evolved to be a handful of regulars and a welcome visitor or two sharing demos, diagnosing problems, discussing new or related software and getting to know visitors. Chats run for two to three hours with participants dropping in or out as their schedules allow.
Try this: add the referenced page to the line up. Then shift-hover over the two Reference items above and notice how the second one will find the single item we want to reference.
.
Notice that the Journal below knows the site, slug and id of the paragraph we used to make the second Reference above. We have all the into in the Journal but no user interface for retrieving it.
{ "id": "8dec790751483c63", "type": "add", "item": { "type": "reference", "id": "8dec790751483c63", "text": "Our open video chats were founded for two different specific purposes using two different zoom addresses. Both have now evolved to be a handful of regulars and a welcome visitor or two sharing demos, diagnosing problems, discussing new or related software and getting to know visitors. Chats run for two to three hours with participants dropping in or out as their schedules allow.", "site": "fed.wiki", "slug": "text-and-video-chats", "title": "Text and Video Chats" }, "after": "655da176e566ec50", "attribution": { "page": "Text and Video Chats", "site": "fed.wiki" }, "date": 1702616614292 },