code.pablomurad.com

indiedesk

Adds opted-in pages from personal sites to a topicless feed, served as Atom and JF2

Tell readers this is an experiment, and stop linking a missing feed.
author
Pablo Murad
date
commit
d335ef24c36b711007e7a9aec20a822bf32620cf
parent
4507ba942068a27b7bd246f60be5f4163a848d5c
changes
2 files +21 −21
@@ -1,39 +1,35 @@ # indiedesk
 
-indiedesk is a public relay that adds pages from personal sites to a feed with no declared topic. It publishes Atom and JF2 Feed. Authors opt in.
+indiedesk is a public relay. Send it a page from your own site and, if the page is shaped right, it keeps a copy in a feed. The feed has no declared topic. You opt in. Readers get Atom and JF2.
 
-## Motive
-
-This is an IndieWeb implementation of the [mezzanine](https://nawashiro.dev/posts/20261005-mezzanine).
-
-- A feed has a shared topic that stays implicit. Readers may catch the mood, or ignore it.
-- The space is small. A post is not thrown into an ocean like an SNS.
-- Anyone can start. The identifier is only a random string.
+This is an experiment. That is why it is fun. The first copy that passes is the one that stays, and a later edit on your site does not rewrite the feed.
 
 ## Posting
 
-Mark the page up with [microformats2](https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Microformats). The server reads one `h-entry` per page.
+Mark the page with [microformats2](https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Microformats). One `h-entry`. Two is too many, and zero is not a post.
 
-1. A feed is identified by a UUID. Receive one from a friend, or generate one. Example: `bbe44bfe-3a9c-410e-ad37-f1bf7402bce4`
-2. Point `rel="collection"` at that UUID. Example: `<link rel="collection" href="urn:uuid:bbe44bfe-3a9c-410e-ad37-f1bf7402bce4">`
+1. A feed is a UUID. Take one from a friend, or make one. `bbe44bfe-3a9c-410e-ad37-f1bf7402bce4` is only a sample.
+2. Point `rel="collection"` at it. Example: `<link rel="collection" href="urn:uuid:bbe44bfe-3a9c-410e-ad37-f1bf7402bce4">`
 3. Link to [this page](/).
 
-After you publish, send a [Webmention](https://indieweb.org/Webmention) to that link. Acceptance returns `HTTP 202`. The relay stores only the first content that passes verification. It does not apply updates.
+After the page is public, send a [Webmention](https://indieweb.org/Webmention). `source` is your page. `target` is this site's root. `HTTP 202` means the relay took the mention. It still has to fetch the page before the post shows up.
 
-[An example of markup that includes mf2 is here.](https://git.pablomurad.com/pablo/indiedesk/src/branch/main/examples/post.html)
+[A marked-up example is in the repository.](https://git.pablomurad.com/pablo/indiedesk/src/branch/main/examples/post.html)
 
 ## Reading
 
-Subscribe to the UUID the author set with `rel="collection"`.
+Subscribe to the UUID in `rel="collection"`.
 
-Examples:
+The files look like this:
 
-- [Atom](/collections/bbe44bfe-3a9c-410e-ad37-f1bf7402bce4.atom)
-- [JF2 Feed](/collections/bbe44bfe-3a9c-410e-ad37-f1bf7402bce4.jf2) [specification](https://jf2.spec.indieweb.org/)
+- `/collections/bbe44bfe-3a9c-410e-ad37-f1bf7402bce4.atom`
+- `/collections/bbe44bfe-3a9c-410e-ad37-f1bf7402bce4.jf2` ([JF2](https://jf2.spec.indieweb.org/))
+
+Those addresses answer 404 until the first post for that UUID is stored. The sample above has never been used, so it is not a live feed.
 
-## Technique
+## Same page, another relay
 
-Send the same page to several relays for redundancy. The IDs match, so a reader can collect the JF2 feeds and merge them.
+Send the same page to more than one relay if you want a spare copy. The entry id is the source URL, so a reader can merge the JF2 feeds.
 
 ```html
 <link rel="collection" href="urn:uuid:bbe44bfe-3a9c-410e-ad37-f1bf7402bce4" />
@@ -41,6 +37,6 @@ <a href="https://alice.example.com/"></a> <a href="https://bob.example.com/"></a>
 ```
 
-## Links
+## Source
 
 - [Source code](https://git.pablomurad.com/pablo/indiedesk)
@@ -120,13 +120,17 @@ `<article class="h-entry">`, 		`<div class="e-content">`,
 		"Posting",
 		"Reading",
+		"This is an experiment.",
 		`rel="webmention"`,
 		`href="` + target + `webmention"`,
-		`href="` + target + `collections/`,
+		"/collections/",
 	} {
 		if !strings.Contains(body, want) {
 			t.Fatalf("missing body text %q in %s", want, body)
 		}
+	}
+	if strings.Contains(body, "Motive") || strings.Contains(body, `href="`+target+`collections/`) {
+		t.Fatalf("old motive block or dead example feed still in the page: %s", body)
 	}
 	if !bytes.Equal(w.Body.Bytes(), a.landing) {
 		t.Fatal("rendered again instead of using the cache")