My personal website, in gleam+lustre!
0
fork

Configure Feed

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

Prepare for a departure off my pi one day


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

+18 -6
+10 -5
dev/homepage/prepare.gleam
··· 1 1 //// Most of this file was borrowed from the project that was replaced by this: 2 2 //// https://forge.strawmelonjuice.com/CynthiaWebsiteEngine/ByYou/src/branch/main/by-you/src/byyou/cli.gleam 3 3 4 + const address = "https://strawmelonjuice.com" 5 + 4 6 import argv 5 7 import gleam/bool 6 8 import gleam/erlang/application ··· 165 167 } 166 168 167 169 fn to_canonical(route: Route) { 168 - "https://strawmelonjuice.com" <> route |> homepage.to_url 170 + address <> route |> homepage.to_url 169 171 } 170 172 171 173 pub fn generate_rss() { ··· 175 177 rss.channel( 176 178 "Mar's site - all posts", 177 179 "Posts on strawmelonjuice dot com", 178 - "https://strawmelonjuice.com", 180 + address, 179 181 ) 180 182 |> rss.with_channel_category("Mixed") 181 183 |> rss.with_channel_web_master("rss-webmaster@strawmelonjuice.com") ··· 186 188 |> rss.with_channel_language("en") 187 189 |> rss.with_channel_items( 188 190 list.map(homepage.posts_entries(homepage.posts()), fn(entry) { 189 - let permalink = 190 - "https://strawmelonjuice.com/post/" <> int.to_string(entry.id) 191 + let permalink = address <> "/post/" <> int.to_string(entry.id) 191 192 let Entry(route:, title:, last_updated:, parent: _, description: _) = 192 193 entry.entry 193 194 let title = glentities.encode(title, glentities.Hex) ··· 222 223 <urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"> 223 224 " <> list.map(homepage.sitemap(), fn(entry) { "<url> 224 225 225 - <loc>https://strawmelonjuice.com" <> entry.route |> homepage.to_url <> "</loc> 226 + <loc>" <> address <> entry.route |> homepage.to_url <> "</loc> 226 227 227 228 <lastmod>" <> entry.last_updated |> homepage.date_to_yyyy_mm_dd <> "</lastmod> 228 229 ··· 276 277 |> string.replace( 277 278 "pub const arrivertisements_show = False", 278 279 "pub const arrivertisements_show = " <> bool.to_string(prod_mode), 280 + ) 281 + |> string.replace( 282 + "pub const address = \"https://strawmelonjuice.com/\"", 283 + "pub const address = \"" <> address <> "/\"", 279 284 ), 280 285 ), 281 286 "❌\tSomething went wrong writing `src/homepage/from_prebuild/data.gleam`.",
+4
justfile
··· 41 41 # Builds and pushes to the server. Make sure to have access to strawmelonservices ;) 42 42 push: build 43 43 rsync -avz --delete ./dist/ strawmelonservices:/root/docker/strawmelonjuice-site/ 44 + bun x wispctl deploy strawmelonjuice.com \ 45 + --path ./dist \ 46 + --site homepage 47 +
+2
priv/codegen-templates/data.gleam
··· 4 4 /// requests due to autoreloading. 5 5 pub const arrivertisements_show = False 6 6 7 + pub const address = "https://strawmelonjuice.com/" 8 + 7 9 pub fn files() { 8 10 dict.from_list(todo as "templated:files") 9 11 }
+2 -1
src/homepage.gleam
··· 765 765 import modem 766 766 767 767 // The site itself 768 + pub const address = data.address 768 769 769 770 pub fn main() { 770 771 let assert Ok(_) = widget.register() ··· 1635 1636 ]), 1636 1637 links: [ 1637 1638 #("Tangled", "https://tangled.org/strawmelonjuice.com/Lumina/"), 1638 - #("Devlog", "https://strawmelonjuice.com/lumina-blog"), 1639 + #("Devlog", address <> "/lumina-blog"), 1639 1640 ], 1640 1641 wip: True, 1641 1642 ),