My personal website, in gleam+lustre!
0
fork

Configure Feed

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

compy


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

+45 -31
+7 -1
gleam.toml
··· 6 6 lustre = ">= 5.6.0 and < 6.0.0" 7 7 modem = ">= 2.1.2 and < 3.0.0" 8 8 jot = ">= 10.1.1 and < 11.0.0" 9 - chilp = ">= 2.0.0-rc4 and < 3.0.0" 9 + chilp = ">= 2.0.1-pre and < 3.0.0" 10 10 # chilp = { git = "https://tangled.org/strawmelonjuice.com/chilp", ref = "main" } 11 11 # chilp = { path = "../../../tangled.sh/strawmelonjuice.com/chilp/" } 12 12 gleam_time = ">= 1.7.0 and < 2.0.0" ··· 30 30 minify = true 31 31 32 32 [tools.lustre.html] 33 + meta = [ 34 + { name = "fediverse:creator", content = "mar@procial.tchncs.de" }, 35 + { name = "fediverse:creator", content = "strawmelonjuice@pony.social" }, 36 + ] 33 37 links = [ 34 38 { rel = "preconnect", href = "https://fontlay.com" }, 35 39 { rel = "shortcut icon", href = "/strawmelonjuice.svg", type = "image/x-icon" }, 36 40 { rel = "alternate", href = "/rss.xml", type = "application/rss+xml", title = "Site-wide RSS Feed" }, 37 41 { rel = "alternate", href = "/atom.xml", type = "application/atom+xml", title = "Site-wide ATOM Feed" }, 38 42 { rel = "me", href = "https://pony.social/@strawmelonjuice" }, 43 + { rel = "me", href = "https://procial.tchncs.de/@mar" }, 44 + { rel = "me", href = "https://bsky.app/profile/did:plc:jgtfsmv25thfs4zmydtbccnn" }, 39 45 { rel = "preload", href = "/styles.css", as = "style" }, 40 46 ] 41 47 scripts = []
+2 -2
manifest.toml
··· 4 4 packages = [ 5 5 { name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" }, 6 6 { name = "booklet", version = "1.1.0", build_tools = ["gleam"], requirements = [], otp_app = "booklet", source = "hex", outer_checksum = "08E0FDB78DC4D8A5D3C80295B021505C7D2A2E7B6C6D5EAB7286C36F4A53C851" }, 7 - { name = "chilp", version = "2.0.0-rc4", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib", "gleam_time", "html_parser", "lustre", "rsvp"], otp_app = "chilp", source = "hex", outer_checksum = "FC8D7AE3A15BD8A97422066B38E4FD966C4E1AEFE65DA371B7C879902D57640E" }, 7 + { name = "chilp", version = "2.0.1-pre", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib", "gleam_time", "html_parser", "lustre", "rsvp"], otp_app = "chilp", source = "hex", outer_checksum = "BCD7D945DE9C0549E42306DE243A13CB8E9F4E51E12AB22AA8EC8C8E861BB7C7" }, 8 8 { name = "directories", version = "1.2.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_stdlib", "platform", "simplifile"], otp_app = "directories", source = "hex", outer_checksum = "D13090CFCDF6759B87217E8DDD73A75903A700148A82C1D33799F333E249BF9E" }, 9 9 { name = "envoy", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "9C6FBB6BFA02A52798BEEC5977A738CAD6E4A057F4B67FD0C8061AD2502C191A" }, 10 10 { name = "exception", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "exception", source = "hex", outer_checksum = "329D269D5C2A314F7364BD2711372B6F2C58FA6F39981572E5CA68624D291F8C" }, ··· 53 53 54 54 [requirements] 55 55 argv = { version = ">= 1.0.2 and < 2.0.0" } 56 - chilp = { version = ">= 2.0.0-rc4 and < 3.0.0" } 56 + chilp = { version = ">= 2.0.1-pre and < 3.0.0" } 57 57 gleam_erlang = { version = ">= 1.3.0 and < 2.0.0" } 58 58 gleam_json = { version = ">= 3.1.0 and < 4.0.0" } 59 59 gleam_regexp = { version = ">= 1.1.1 and < 2.0.0" }
+27 -18
src/homepage.gleam
··· 1 + import chilp/widget 2 + 1 3 const highlighted_posts = [4] 2 4 3 5 /// Post data ------------------------------------------------------------------- ··· 66 68 ], 67 69 aliases: [], 68 70 comments: Both( 69 - post_id_mastodon: "116453666510859359", 70 - post_id_bsky: "3mk5u4xwqus2i", 71 + fedi_instance: "pony.social", 72 + fedi_post_id: "116453666510859359", 73 + bsky_post_id: "3mk5u4xwqus2i", 71 74 ), 72 75 ), 73 76 Post( ··· 133 136 body: File(Djot, "./written-contents/blog/personal/2026/new-site.dj"), 134 137 aliases: ["first"], 135 138 comments: Both( 136 - post_id_mastodon: "116213072855558563", 137 - post_id_bsky: "3mgt3lymlak2c", 139 + fedi_instance: "pony.social", 140 + fedi_post_id: "116213072855558563", 141 + bsky_post_id: "3mgt3lymlak2c", 138 142 ), 139 143 category: "Personal", 140 144 tags: [ ··· 231 235 ], 232 236 aliases: ["strawmelonjuice-logo-2026"], 233 237 comments: Both( 234 - post_id_mastodon: "115871671627793187", 235 - post_id_bsky: "3mjykbz7dms2a", 238 + fedi_instance: "pony.social", 239 + fedi_post_id: "115871671627793187", 240 + bsky_post_id: "3mjykbz7dms2a", 236 241 ), 237 242 ), 238 243 Post( ··· 799 804 // The imports 800 805 801 806 import chilp 802 - import chilp/widget 803 - import chilp/widget/anchors 804 807 import gleam/bool 805 808 import gleam/function 806 809 import gleam/int ··· 2469 2472 case post.comments { 2470 2473 CommentsDisable -> 2471 2474 element.text("Comments are disabled for this post.") 2472 - MastodonStatusLink(instance:, id:) -> 2473 - chilp.widget(Some(anchors.Mastodon(instance:, postid: id)), None) 2474 - BskyOnly(postid) -> 2475 + MastodonStatusLink(instance:, id: post_id) -> 2476 + chilp.widget( 2477 + Some(chilp.mastodon(instance:, post_id:)), 2478 + bluesky: None, 2479 + ) 2480 + BskyOnly(post_id) -> 2475 2481 chilp.widget( 2476 - None, 2477 - Some(anchors.Bluesky( 2482 + mastodon: None, 2483 + bluesky: Some(chilp.bluesky( 2478 2484 did: "did:plc:jgtfsmv25thfs4zmydtbccnn", 2479 - postid:, 2485 + post_id:, 2480 2486 )), 2481 2487 ) 2482 - Both(id_mastodon, id_bsky) -> 2488 + Both(fedi_instance:, fedi_post_id:, bsky_post_id:) -> 2483 2489 chilp.widget( 2484 - Some(anchors.Mastodon("pony.social", postid: id_mastodon)), 2485 - Some(anchors.Bluesky( 2490 + mastodon: Some(chilp.mastodon( 2491 + post_id: fedi_post_id, 2492 + instance: fedi_instance, 2493 + )), 2494 + bluesky: Some(chilp.bluesky( 2486 2495 did: "did:plc:jgtfsmv25thfs4zmydtbccnn", 2487 - postid: id_bsky, 2496 + post_id: bsky_post_id, 2488 2497 )), 2489 2498 ) 2490 2499 },
+2 -2
src/homepage/stuff.gleam
··· 112 112 CommentsDisable 113 113 /// Warning! Assumes did, to main. 114 114 BskyOnly(postid: String) 115 - /// Warning! Assumes did, to main, and assumes instance to ponysocial 116 - Both(post_id_mastodon: String, post_id_bsky: String) 115 + /// Warning! Assumes did 116 + Both(fedi_instance: String, fedi_post_id: String, bsky_post_id: String) 117 117 } 118 118 119 119 pub type NormalizedPost {
+7 -8
written-contents/blog/devblog/chilp/chilp-2.dj
··· 19 19 20 20 Okay, the intro is done, let me show you how easy it is for me to insert a Chilp widget. 21 21 22 - This is just the example from <https://github.com/lustre-labs/lustre/blob/main/examples/01-basics/01-hello-world/src/app.gleam>, I added only about 20 lines to it! 22 + This is just the example from <https://github.com/lustre-labs/lustre/blob/main/examples/01-basics/01-hello-world/src/app.gleam>, I added only about 12 lines to it! 23 23 24 24 ### An example 25 25 ··· 30 30 import lustre/element.{type Element} 31 31 import lustre/element/html 32 32 import lustre/event 33 - import chilp // <--- Imports Chilp the ergonomic way, if you want less imports, 34 - import chilp/widget // /-------- going with only `chilp/widget` is okay too! Then you'd need to 35 - import chilp/widget/anchors // <- make sure your anchor is sanely split using a backslash though. 33 + import chilp 34 + import chilp/widget 36 35 37 36 // MAIN ----------------------------------------------------------------------------------------------------------------- 38 37 ··· 77 76 // And then we place the widget itself here! under the counter. 78 77 chilp.widget( 79 78 // Anchoring this one to me mewing on the timeline 80 - option.Some(anchors.Mastodon( 79 + mastodon: option.Some(chilp.mastodon( 81 80 instance: "pony.social", 82 81 postid: "115911235653686237", 83 82 )), 84 83 // And anchoring this one to a post about my hamster 85 - option.Some(anchors.Bluesky( 84 + bluesky: option.Some(chilp.bluesky( 86 85 did: "did:plc:jgtfsmv25thfs4zmydtbccnn", 87 - postid: "3mjeg3m7fd22i", 86 + post_id: "3mjeg3m7fd22i", 88 87 )), 89 88 ), 90 89 ]) ··· 99 98 It also creates the well known 'enter your instance address' for Mastodon users to respond from the instance of their choice, while showing buttons 100 99 to the favourite appviews for Bluesky users to instantly respond! 101 100 102 - Let's not keep on nerding now, just AMA in the comments below! 101 + Let's not keep on nerding now, just AMA in those comments below! ;)