{
"path": "/3mh2emfart22s",
"site": "at://did:plc:6i6n57nrkq6xavqbdo6bvkqr/site.standard.publication/3luavqk6mfs2n",
"tags": [
"custom-feeds",
"tutorial",
"atproto"
],
"$type": "site.standard.document",
"title": "Making Feeds: Custom Logic Requests",
"content": {
"$type": "pub.leaflet.content",
"pages": [
{
"id": "019cee15-9f4e-7778-99c5-591a003c0a51",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 37,
"byteStart": 25
},
"features": [
{
"uri": "https://graze.social",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "All logic is shown using graze.social nodes. Posts for testing the provided logic works as expected are included, but may not return the expected results if you have other logic in the feed definition."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.horizontalRule"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"id": "019cee37-731f-7999-b7ab-615ab63ed54b",
"$type": "pub.leaflet.blocks.page"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": ""
}
}
]
},
{
"id": "019cee5b-5a2a-7ffb-a149-6a1a4bfe398c",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.header",
"level": 1,
"plaintext": "Exclude links in quote posts"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 72,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
},
{
"index": {
"byteEnd": 84,
"byteStart": 72
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
},
{
"uri": "https://graze.social",
"$type": "pub.leaflet.richtext.facet#link"
}
]
},
{
"index": {
"byteEnd": 143,
"byteStart": 84
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": "don't want posts that quote posts with links either? add this logic. in graze.social, this requires using the JSON view of the feed definition."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"alt": "\"All of these\" logic node with \"exclude all links\" custom node and a regex node that looks for posts missing a period in the hydrated_metadata.quote_post.record.facets[*].features[*].uri field. This field needs to be added manually by going to the JSON view and replacing \"text\" entry with the above under the \"regex_matches\".",
"$type": "pub.leaflet.blocks.image",
"image": {
"$type": "blob",
"ref": {
"$link": "bafkreifbzvwoynaabv6l2mdnz5msx7ci2itf466qqao42tlbwtlnramb3e"
},
"mimeType": "image/png",
"size": 36011
},
"aspectRatio": {
"width": 769,
"height": 495
}
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": ""
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 44,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "Test posts - these should fail (be excluded)"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.unorderedList",
"children": [
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 60,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3mh2f3roivc2o",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Quote of a post with a link embed, no link in quote-response"
}
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 62,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3mh2fiuvfb22r",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Quote of a post with a link in text, no link in quote-response"
}
}
]
}
}
]
},
{
"id": "019cee37-731f-7999-b7ab-615ab63ed54b",
"$type": "pub.leaflet.pages.linearDocument",
"blocks": [
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.header",
"level": 1,
"facets": [
{
"index": {
"byteEnd": 17,
"byteStart": 14
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": "How to remove all links?"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 54,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#italic"
}
]
}
],
"plaintext": "not just link embeds, but also links only in the text?"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"alt": "Inside an \"all of these\" logic node: regex node looking for posts where the facet features uri is missing \\. (a period symbol) and an \"any of these\" logic node. Inside the \"any of these\" node: an embed missing link node (which looks for links that have embeds) and a regex looking for post where the link card url contains \".gif?\" (gifs can look like links, so it's ok if it has an embed link *if* that is a gif link)\\",
"$type": "pub.leaflet.blocks.image",
"image": {
"$type": "blob",
"ref": {
"$link": "bafkreid6ag43xz53wakd7qs4zykhmhoiasnenjpl5qjayxtcqx5w6onzqy"
},
"mimeType": "image/png",
"size": 51063
},
"aspectRatio": {
"width": 712,
"height": 731
}
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": ""
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 45,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "Test posts - these should fail (be excluded):"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.unorderedList",
"children": [
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 24,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3mh2ce4k2y22o",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Link in text, link embed"
}
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 28,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3mh2cf7u25s2o",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Link not in text, link embed"
}
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 27,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3mh2chruucc2o",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Link in text, no embed link "
}
}
]
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 53,
"byteStart": 0
},
"features": [
{
"$type": "pub.leaflet.richtext.facet#bold"
}
]
}
],
"plaintext": "Counter test posts - these should pass (be included):"
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.unorderedList",
"children": [
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 37,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3lz2k6eiles25",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Image, no link in text, no link embed"
}
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 41,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/did:plc:dvyl6rnuy436idbywwddf72g/post/3lz2mishzrc25",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Gif, no link in text, gif gets embed link"
}
},
{
"$type": "pub.leaflet.blocks.unorderedList#listItem",
"content": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 53,
"byteStart": 0
},
"features": [
{
"uri": "https://bsky.app/profile/byarielm.sprk.so/post/3mh2f3roivc2o",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "Link not in text, no embed link, quoted post has link"
}
}
]
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": ""
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"facets": [
{
"index": {
"byteEnd": 60,
"byteStart": 48
},
"features": [
{
"uri": "https://graze.social",
"$type": "pub.leaflet.richtext.facet#link"
}
]
}
],
"plaintext": "This logic set is available as a custom node in graze.social - just search \"Exclude All Links\" under the 'custom' tab in the feed editor."
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"$type": "pub.leaflet.blocks.text",
"plaintext": ""
}
},
{
"$type": "pub.leaflet.pages.linearDocument#block",
"block": {
"id": "019cee5b-5a2a-7ffb-a149-6a1a4bfe398c",
"$type": "pub.leaflet.blocks.page"
}
}
]
}
]
},
"description": "demonstrates common logic requested for custom feeds ",
"publishedAt": "2026-03-14T21:26:47.636Z"
}