Allows you to use Mastodon and Bluesky comments on your Lustre blog hexdocs.pm/chilp/
blog gleam lustre indieweb mastodon bluesky comments
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Small documentation updates


Signed-off-by: MLC Bloeiman <mar@strawmelonjuice.com>

+5 -6
-1
README.md
··· 10 10 ## Examples 11 11 12 12 - [lustre_chilp_app](https://forge.strawmelonjuice.com/strawmelonjuice/chilp/src/branch/main/examples/lustre_chilp_app) 13 - - [lustre_chilp_app_nocomponent](https://forge.strawmelonjuice.com/strawmelonjuice/chilp/src/branch/main/examples/lustre_chilp_app_nocomponent) 14 13 15 14 Further documentation can be found at <https://hexdocs.pm/chilp>. 16 15
+1 -1
gleam.toml
··· 1 1 name = "chilp" 2 - description = "Allows you to use Mastodon comments on your Lustre blog." 2 + description = "Allows you to use Mastodon and Bluesky comments on your Lustre blog." 3 3 version = "2.0.0-rc" 4 4 gleam = ">= 1.15.0" 5 5 licences = ["Apache-2.0"]
+3 -3
src/chilp/widget.gleam
··· 838 838 839 839 /// A Bluesky Threadview, like what you get from `https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread?uri=at://did:plc:jgtfsmv25thfs4zmydtbccnn/app.bsky.feed.post/3mgrbiiadws2k`. 840 840 /// This one is very pruned! Why? Because these json responses are huge and we only need a small subset of the data in them! 841 - pub type BskyThreadView { 841 + type BskyThreadView { 842 842 BskyThreadView(at_uri: String, replies: List(BskyThreadReply)) 843 843 } 844 844 845 - pub type BskyThreadReply { 845 + type BskyThreadReply { 846 846 BskyThreadReply( 847 847 at_uri: String, 848 848 like_count: Int, ··· 856 856 ) 857 857 } 858 858 859 - pub fn bsky_thread_view_decoder() -> decode.Decoder(BskyThreadView) { 859 + fn bsky_thread_view_decoder() -> decode.Decoder(BskyThreadView) { 860 860 use at_uri <- decode.subfield(["thread", "post", "uri"], decode.string) 861 861 use replies <- decode.subfield( 862 862 ["thread", "replies"],
+1 -1
src/chilp/widget/anchors.gleam
··· 1 1 pub type Mastodon { 2 2 Mastodon( 3 - /// The instance name, e.g. mastodon.social 3 + /// The instance name, e.g. mastodon.social, this is where your post is stored, and where chilp will attempt to fetch it from. 4 4 instance: String, 5 5 /// A post id to bind to, you'll find this in a post url `https://mastodon.social/@<username>/[postid]`. 6 6 postid: String,