The code and data behind xeiaso.net
5
fork

Configure Feed

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

Add hero image support with <xeblog-hero>

Also lightens the JavaScript load and shifts ad impressions to only when
people from Reddit and Hacker News visit. I may have this include
Twitter in the future.

Signed-off-by: Xe <me@christine.website>

Xe Iaso dc3f6471 396150f7

+600 -239
+365 -217
Cargo.lock
··· 44 44 source = "registry+https://github.com/rust-lang/crates.io-index" 45 45 checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 46 46 dependencies = [ 47 - "getrandom 0.2.5", 47 + "getrandom 0.2.6", 48 48 "once_cell", 49 49 "version_check", 50 50 ] ··· 99 99 100 100 [[package]] 101 101 name = "async-compression" 102 - version = "0.3.12" 102 + version = "0.3.14" 103 103 source = "registry+https://github.com/rust-lang/crates.io-index" 104 - checksum = "f2bf394cfbbe876f0ac67b13b6ca819f9c9f2fb9ec67223cceb1555fbab1c31a" 104 + checksum = "345fd392ab01f746c717b1357165b76f0b67a60192007b234058c9045fdcf695" 105 105 dependencies = [ 106 106 "brotli", 107 107 "flate2", ··· 113 113 114 114 [[package]] 115 115 name = "async-trait" 116 - version = "0.1.52" 116 + version = "0.1.56" 117 117 source = "registry+https://github.com/rust-lang/crates.io-index" 118 - checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" 118 + checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" 119 119 dependencies = [ 120 120 "proc-macro2", 121 121 "quote", ··· 141 141 142 142 [[package]] 143 143 name = "axum" 144 - version = "0.5.6" 144 + version = "0.2.8" 145 + source = "registry+https://github.com/rust-lang/crates.io-index" 146 + checksum = "8f08f95a202e827209db1491047aa57c18c8adb4c5efcfcfd4a2da4838ee3a72" 147 + dependencies = [ 148 + "async-trait", 149 + "bitflags", 150 + "bytes", 151 + "futures-util", 152 + "http", 153 + "http-body", 154 + "hyper", 155 + "pin-project-lite", 156 + "regex", 157 + "serde", 158 + "serde_json", 159 + "serde_urlencoded", 160 + "sync_wrapper", 161 + "tokio", 162 + "tokio-util 0.6.10", 163 + "tower", 164 + "tower-http 0.1.3", 165 + "tower-layer", 166 + "tower-service", 167 + ] 168 + 169 + [[package]] 170 + name = "axum" 171 + version = "0.5.7" 145 172 source = "registry+https://github.com/rust-lang/crates.io-index" 146 - checksum = "ab2504b827a8bef941ba3dd64bdffe9cf56ca182908a147edd6189c95fbcae7d" 173 + checksum = "dc47084705629d09d15060d70a8dbfce479c842303d05929ce29c74c995916ae" 147 174 dependencies = [ 148 175 "async-trait", 149 176 "axum-core", 150 177 "bitflags", 151 178 "bytes", 152 179 "futures-util", 180 + "headers", 153 181 "http", 154 182 "http-body", 155 183 "hyper", 156 - "itoa 1.0.1", 184 + "itoa 1.0.2", 157 185 "matchit", 158 186 "memchr", 159 187 "mime", ··· 165 193 "sync_wrapper", 166 194 "tokio", 167 195 "tower", 168 - "tower-http", 196 + "tower-http 0.3.4", 169 197 "tower-layer", 170 198 "tower-service", 171 199 ] 172 200 173 201 [[package]] 174 202 name = "axum-core" 175 - version = "0.2.4" 203 + version = "0.2.5" 176 204 source = "registry+https://github.com/rust-lang/crates.io-index" 177 - checksum = "da31c0ed7b4690e2c78fe4b880d21cd7db04a346ebc658b4270251b695437f17" 205 + checksum = "c2efed1c501becea07ce48118786ebcf229531d0d3b28edf224a720020d9e106" 178 206 dependencies = [ 179 207 "async-trait", 180 208 "bytes", ··· 186 214 187 215 [[package]] 188 216 name = "axum-extra" 189 - version = "0.3.3" 217 + version = "0.3.4" 190 218 source = "registry+https://github.com/rust-lang/crates.io-index" 191 - checksum = "75330529f6b27544cedc6089108602a056d016df6aa4f2cb24408d840392ef2d" 219 + checksum = "4f4a22e494aab08f7fb9e9b462e49e4c1637dd9a4bfa4250e9addfdbafc1a022" 192 220 dependencies = [ 193 - "axum", 221 + "axum 0.5.7", 194 222 "bytes", 195 223 "http", 196 224 "mime", 197 225 "pin-project-lite", 226 + "tokio", 198 227 "tower", 199 - "tower-http", 228 + "tower-http 0.3.4", 200 229 "tower-layer", 201 230 "tower-service", 202 231 ] ··· 215 244 216 245 [[package]] 217 246 name = "backtrace" 218 - version = "0.3.64" 247 + version = "0.3.65" 219 248 source = "registry+https://github.com/rust-lang/crates.io-index" 220 - checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f" 249 + checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" 221 250 dependencies = [ 222 251 "addr2line", 223 252 "cc", ··· 271 300 ] 272 301 273 302 [[package]] 303 + name = "block-buffer" 304 + version = "0.10.2" 305 + source = "registry+https://github.com/rust-lang/crates.io-index" 306 + checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" 307 + dependencies = [ 308 + "generic-array 0.14.5", 309 + ] 310 + 311 + [[package]] 274 312 name = "block-padding" 275 313 version = "0.1.5" 276 314 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 281 319 282 320 [[package]] 283 321 name = "brotli" 284 - version = "3.3.3" 322 + version = "3.3.4" 285 323 source = "registry+https://github.com/rust-lang/crates.io-index" 286 - checksum = "f838e47a451d5a8fa552371f80024dd6ace9b7acdf25c4c3d0f9bc6816fb1c39" 324 + checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" 287 325 dependencies = [ 288 326 "alloc-no-stdlib", 289 327 "alloc-stdlib", ··· 302 340 303 341 [[package]] 304 342 name = "bumpalo" 305 - version = "3.9.1" 343 + version = "3.10.0" 306 344 source = "registry+https://github.com/rust-lang/crates.io-index" 307 - checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 345 + checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" 308 346 309 347 [[package]] 310 348 name = "byte-tools" ··· 314 352 315 353 [[package]] 316 354 name = "bytecount" 317 - version = "0.6.2" 355 + version = "0.6.3" 318 356 source = "registry+https://github.com/rust-lang/crates.io-index" 319 - checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" 357 + checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" 320 358 321 359 [[package]] 322 360 name = "byteorder" ··· 503 541 ] 504 542 505 543 [[package]] 544 + name = "crypto-common" 545 + version = "0.1.3" 546 + source = "registry+https://github.com/rust-lang/crates.io-index" 547 + checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" 548 + dependencies = [ 549 + "generic-array 0.14.5", 550 + "typenum", 551 + ] 552 + 553 + [[package]] 506 554 name = "cssparser" 507 555 version = "0.27.2" 508 556 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 598 646 ] 599 647 600 648 [[package]] 649 + name = "digest" 650 + version = "0.10.3" 651 + source = "registry+https://github.com/rust-lang/crates.io-index" 652 + checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" 653 + dependencies = [ 654 + "block-buffer 0.10.2", 655 + "crypto-common", 656 + ] 657 + 658 + [[package]] 601 659 name = "dirs" 602 660 version = "4.0.0" 603 661 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 655 713 656 714 [[package]] 657 715 name = "encoding_rs" 658 - version = "0.8.30" 716 + version = "0.8.31" 659 717 source = "registry+https://github.com/rust-lang/crates.io-index" 660 - checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" 718 + checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" 661 719 dependencies = [ 662 720 "cfg-if", 663 721 ] ··· 733 791 734 792 [[package]] 735 793 name = "flate2" 736 - version = "1.0.22" 794 + version = "1.0.24" 737 795 source = "registry+https://github.com/rust-lang/crates.io-index" 738 - checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" 796 + checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 739 797 dependencies = [ 740 - "cfg-if", 741 798 "crc32fast", 742 - "libc", 743 799 "miniz_oxide", 744 800 ] 745 801 ··· 904 960 905 961 [[package]] 906 962 name = "getrandom" 907 - version = "0.2.5" 963 + version = "0.2.6" 908 964 source = "registry+https://github.com/rust-lang/crates.io-index" 909 - checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" 965 + checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" 910 966 dependencies = [ 911 967 "cfg-if", 912 968 "libc", ··· 927 983 928 984 [[package]] 929 985 name = "h2" 930 - version = "0.3.12" 986 + version = "0.3.13" 931 987 source = "registry+https://github.com/rust-lang/crates.io-index" 932 - checksum = "62eeb471aa3e3c9197aa4bfeabfe02982f6dc96f750486c0bb0009ac58b26d2b" 988 + checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" 933 989 dependencies = [ 934 990 "bytes", 935 991 "fnv", ··· 940 996 "indexmap", 941 997 "slab", 942 998 "tokio", 943 - "tokio-util 0.6.9", 999 + "tokio-util 0.7.3", 944 1000 "tracing", 945 1001 ] 946 1002 ··· 980 1036 ] 981 1037 982 1038 [[package]] 1039 + name = "headers" 1040 + version = "0.3.7" 1041 + source = "registry+https://github.com/rust-lang/crates.io-index" 1042 + checksum = "4cff78e5788be1e0ab65b04d306b2ed5092c815ec97ec70f4ebd5aee158aa55d" 1043 + dependencies = [ 1044 + "base64", 1045 + "bitflags", 1046 + "bytes", 1047 + "headers-core", 1048 + "http", 1049 + "httpdate", 1050 + "mime", 1051 + "sha-1 0.10.0", 1052 + ] 1053 + 1054 + [[package]] 1055 + name = "headers-core" 1056 + version = "0.2.0" 1057 + source = "registry+https://github.com/rust-lang/crates.io-index" 1058 + checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" 1059 + dependencies = [ 1060 + "http", 1061 + ] 1062 + 1063 + [[package]] 983 1064 name = "heck" 984 1065 version = "0.4.0" 985 1066 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1017 1098 dependencies = [ 1018 1099 "bytes", 1019 1100 "fnv", 1020 - "itoa 1.0.1", 1101 + "itoa 1.0.2", 1021 1102 ] 1022 1103 1023 1104 [[package]] ··· 1039 1120 1040 1121 [[package]] 1041 1122 name = "httparse" 1042 - version = "1.6.0" 1123 + version = "1.7.1" 1043 1124 source = "registry+https://github.com/rust-lang/crates.io-index" 1044 - checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" 1125 + checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" 1045 1126 1046 1127 [[package]] 1047 1128 name = "httpdate" ··· 1060 1141 1061 1142 [[package]] 1062 1143 name = "hyper" 1063 - version = "0.14.17" 1144 + version = "0.14.19" 1064 1145 source = "registry+https://github.com/rust-lang/crates.io-index" 1065 - checksum = "043f0e083e9901b6cc658a77d1eb86f4fc650bbb977a4337dd63192826aa85dd" 1146 + checksum = "42dc3c131584288d375f2d07f822b0cb012d8c6fb899a5b9fdb3cb7eb9b6004f" 1066 1147 dependencies = [ 1067 1148 "bytes", 1068 1149 "futures-channel", ··· 1073 1154 "http-body", 1074 1155 "httparse", 1075 1156 "httpdate", 1076 - "itoa 1.0.1", 1157 + "itoa 1.0.2", 1077 1158 "pin-project-lite", 1078 1159 "socket2", 1079 1160 "tokio", ··· 1114 1195 1115 1196 [[package]] 1116 1197 name = "indexmap" 1117 - version = "1.8.0" 1198 + version = "1.8.2" 1118 1199 source = "registry+https://github.com/rust-lang/crates.io-index" 1119 - checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" 1200 + checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" 1120 1201 dependencies = [ 1121 1202 "autocfg", 1122 1203 "hashbrown 0.11.2", ··· 1133 1214 1134 1215 [[package]] 1135 1216 name = "ipnet" 1136 - version = "2.4.0" 1217 + version = "2.5.0" 1137 1218 source = "registry+https://github.com/rust-lang/crates.io-index" 1138 - checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" 1219 + checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" 1139 1220 1140 1221 [[package]] 1141 1222 name = "iri-string" ··· 1172 1253 1173 1254 [[package]] 1174 1255 name = "itoa" 1175 - version = "1.0.1" 1256 + version = "1.0.2" 1176 1257 source = "registry+https://github.com/rust-lang/crates.io-index" 1177 - checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" 1258 + checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" 1178 1259 1179 1260 [[package]] 1180 1261 name = "js-sys" 1181 - version = "0.3.56" 1262 + version = "0.3.57" 1182 1263 source = "registry+https://github.com/rust-lang/crates.io-index" 1183 - checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" 1264 + checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" 1184 1265 dependencies = [ 1185 1266 "wasm-bindgen", 1186 1267 ] ··· 1228 1309 1229 1310 [[package]] 1230 1311 name = "libc" 1231 - version = "0.2.120" 1312 + version = "0.2.126" 1232 1313 source = "registry+https://github.com/rust-lang/crates.io-index" 1233 - checksum = "ad5c14e80759d0939d013e6ca49930e59fc53dd8e5009132f76240c179380c09" 1314 + checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" 1234 1315 1235 1316 [[package]] 1236 1317 name = "line-wrap" ··· 1249 1330 1250 1331 [[package]] 1251 1332 name = "lock_api" 1252 - version = "0.4.6" 1333 + version = "0.4.7" 1253 1334 source = "registry+https://github.com/rust-lang/crates.io-index" 1254 - checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" 1335 + checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" 1255 1336 dependencies = [ 1337 + "autocfg", 1256 1338 "scopeguard", 1257 1339 ] 1258 1340 1259 1341 [[package]] 1260 1342 name = "log" 1261 - version = "0.4.14" 1343 + version = "0.4.17" 1262 1344 source = "registry+https://github.com/rust-lang/crates.io-index" 1263 - checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 1345 + checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1264 1346 dependencies = [ 1265 1347 "cfg-if", 1266 1348 ] ··· 1303 1385 checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" 1304 1386 1305 1387 [[package]] 1388 + name = "maud" 1389 + version = "0.23.0" 1390 + source = "registry+https://github.com/rust-lang/crates.io-index" 1391 + checksum = "7384febb4f8fc970cc2efab1650a6f48cac2e79b0b29587c90497b646fb10e1e" 1392 + dependencies = [ 1393 + "axum 0.2.8", 1394 + "maud_macros", 1395 + ] 1396 + 1397 + [[package]] 1398 + name = "maud_macros" 1399 + version = "0.23.0" 1400 + source = "registry+https://github.com/rust-lang/crates.io-index" 1401 + checksum = "423430ac467408136d7de93f2929debd8a7bc3e795c92476f45e259b158e3355" 1402 + dependencies = [ 1403 + "proc-macro-error", 1404 + "proc-macro2", 1405 + "quote", 1406 + "syn", 1407 + ] 1408 + 1409 + [[package]] 1306 1410 name = "md5" 1307 1411 version = "0.7.0" 1308 1412 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1310 1414 1311 1415 [[package]] 1312 1416 name = "memchr" 1313 - version = "2.4.1" 1417 + version = "2.5.0" 1314 1418 source = "registry+https://github.com/rust-lang/crates.io-index" 1315 - checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 1419 + checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1316 1420 1317 1421 [[package]] 1318 1422 name = "mi" ··· 1355 1459 1356 1460 [[package]] 1357 1461 name = "miniz_oxide" 1358 - version = "0.4.4" 1462 + version = "0.5.3" 1359 1463 source = "registry+https://github.com/rust-lang/crates.io-index" 1360 - checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" 1464 + checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" 1361 1465 dependencies = [ 1362 1466 "adler", 1363 - "autocfg", 1364 1467 ] 1365 1468 1366 1469 [[package]] 1367 1470 name = "mio" 1368 - version = "0.8.2" 1471 + version = "0.8.3" 1369 1472 source = "registry+https://github.com/rust-lang/crates.io-index" 1370 - checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" 1473 + checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" 1371 1474 dependencies = [ 1372 1475 "libc", 1373 1476 "log", 1374 - "miow", 1375 - "ntapi", 1376 1477 "wasi 0.11.0+wasi-snapshot-preview1", 1377 - "winapi", 1378 - ] 1379 - 1380 - [[package]] 1381 - name = "miow" 1382 - version = "0.3.7" 1383 - source = "registry+https://github.com/rust-lang/crates.io-index" 1384 - checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 1385 - dependencies = [ 1386 - "winapi", 1478 + "windows-sys", 1387 1479 ] 1388 1480 1389 1481 [[package]] 1390 1482 name = "native-tls" 1391 - version = "0.2.8" 1483 + version = "0.2.10" 1392 1484 source = "registry+https://github.com/rust-lang/crates.io-index" 1393 - checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" 1485 + checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" 1394 1486 dependencies = [ 1395 1487 "lazy_static", 1396 1488 "libc", ··· 1432 1524 ] 1433 1525 1434 1526 [[package]] 1435 - name = "ntapi" 1436 - version = "0.3.7" 1437 - source = "registry+https://github.com/rust-lang/crates.io-index" 1438 - checksum = "c28774a7fd2fbb4f0babd8237ce554b73af68021b5f695a3cebd6c59bac0980f" 1439 - dependencies = [ 1440 - "winapi", 1441 - ] 1442 - 1443 - [[package]] 1444 1527 name = "num-integer" 1445 - version = "0.1.44" 1528 + version = "0.1.45" 1446 1529 source = "registry+https://github.com/rust-lang/crates.io-index" 1447 - checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 1530 + checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1448 1531 dependencies = [ 1449 1532 "autocfg", 1450 1533 "num-traits", ··· 1452 1535 1453 1536 [[package]] 1454 1537 name = "num-traits" 1455 - version = "0.2.14" 1538 + version = "0.2.15" 1456 1539 source = "registry+https://github.com/rust-lang/crates.io-index" 1457 - checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1540 + checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1458 1541 dependencies = [ 1459 1542 "autocfg", 1460 1543 ] ··· 1471 1554 1472 1555 [[package]] 1473 1556 name = "num_threads" 1474 - version = "0.1.5" 1557 + version = "0.1.6" 1475 1558 source = "registry+https://github.com/rust-lang/crates.io-index" 1476 - checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" 1559 + checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" 1477 1560 dependencies = [ 1478 1561 "libc", 1479 1562 ] 1480 1563 1481 1564 [[package]] 1482 1565 name = "object" 1483 - version = "0.27.1" 1566 + version = "0.28.4" 1484 1567 source = "registry+https://github.com/rust-lang/crates.io-index" 1485 - checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" 1568 + checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" 1486 1569 dependencies = [ 1487 1570 "memchr", 1488 1571 ] 1489 1572 1490 1573 [[package]] 1491 1574 name = "once_cell" 1492 - version = "1.10.0" 1575 + version = "1.12.0" 1493 1576 source = "registry+https://github.com/rust-lang/crates.io-index" 1494 - checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" 1577 + checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" 1495 1578 1496 1579 [[package]] 1497 1580 name = "onig" ··· 1529 1612 1530 1613 [[package]] 1531 1614 name = "openssl" 1532 - version = "0.10.38" 1615 + version = "0.10.40" 1533 1616 source = "registry+https://github.com/rust-lang/crates.io-index" 1534 - checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" 1617 + checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" 1535 1618 dependencies = [ 1536 1619 "bitflags", 1537 1620 "cfg-if", 1538 1621 "foreign-types", 1539 1622 "libc", 1540 1623 "once_cell", 1624 + "openssl-macros", 1541 1625 "openssl-sys", 1542 1626 ] 1543 1627 1544 1628 [[package]] 1629 + name = "openssl-macros" 1630 + version = "0.1.0" 1631 + source = "registry+https://github.com/rust-lang/crates.io-index" 1632 + checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" 1633 + dependencies = [ 1634 + "proc-macro2", 1635 + "quote", 1636 + "syn", 1637 + ] 1638 + 1639 + [[package]] 1545 1640 name = "openssl-probe" 1546 1641 version = "0.1.5" 1547 1642 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1549 1644 1550 1645 [[package]] 1551 1646 name = "openssl-sys" 1552 - version = "0.9.72" 1647 + version = "0.9.74" 1553 1648 source = "registry+https://github.com/rust-lang/crates.io-index" 1554 - checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" 1649 + checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" 1555 1650 dependencies = [ 1556 1651 "autocfg", 1557 1652 "cc", ··· 1562 1657 1563 1658 [[package]] 1564 1659 name = "owo-colors" 1565 - version = "3.2.0" 1660 + version = "3.4.0" 1566 1661 source = "registry+https://github.com/rust-lang/crates.io-index" 1567 - checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" 1662 + checksum = "decf7381921fea4dcb2549c5667eda59b3ec297ab7e2b5fc33eac69d2e7da87b" 1568 1663 1569 1664 [[package]] 1570 1665 name = "parking_lot" 1571 - version = "0.12.0" 1666 + version = "0.12.1" 1572 1667 source = "registry+https://github.com/rust-lang/crates.io-index" 1573 - checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" 1668 + checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1574 1669 dependencies = [ 1575 1670 "lock_api", 1576 1671 "parking_lot_core", ··· 1578 1673 1579 1674 [[package]] 1580 1675 name = "parking_lot_core" 1581 - version = "0.9.1" 1676 + version = "0.9.3" 1582 1677 source = "registry+https://github.com/rust-lang/crates.io-index" 1583 - checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" 1678 + checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" 1584 1679 dependencies = [ 1585 1680 "cfg-if", 1586 1681 "libc", ··· 1675 1770 dependencies = [ 1676 1771 "maplit", 1677 1772 "pest", 1678 - "sha-1", 1773 + "sha-1 0.8.2", 1679 1774 ] 1680 1775 1681 1776 [[package]] ··· 1766 1861 1767 1862 [[package]] 1768 1863 name = "pin-project-lite" 1769 - version = "0.2.8" 1864 + version = "0.2.9" 1770 1865 source = "registry+https://github.com/rust-lang/crates.io-index" 1771 - checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" 1866 + checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1772 1867 1773 1868 [[package]] 1774 1869 name = "pin-utils" ··· 1778 1873 1779 1874 [[package]] 1780 1875 name = "pkg-config" 1781 - version = "0.3.24" 1876 + version = "0.3.25" 1782 1877 source = "registry+https://github.com/rust-lang/crates.io-index" 1783 - checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 1878 + checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 1784 1879 1785 1880 [[package]] 1786 1881 name = "plist" ··· 1792 1887 "indexmap", 1793 1888 "line-wrap", 1794 1889 "serde", 1795 - "time 0.3.7", 1890 + "time 0.3.9", 1796 1891 "xml-rs", 1797 1892 ] 1798 1893 ··· 1828 1923 ] 1829 1924 1830 1925 [[package]] 1926 + name = "proc-macro-error" 1927 + version = "1.0.4" 1928 + source = "registry+https://github.com/rust-lang/crates.io-index" 1929 + checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1930 + dependencies = [ 1931 + "proc-macro-error-attr", 1932 + "proc-macro2", 1933 + "quote", 1934 + "syn", 1935 + "version_check", 1936 + ] 1937 + 1938 + [[package]] 1939 + name = "proc-macro-error-attr" 1940 + version = "1.0.4" 1941 + source = "registry+https://github.com/rust-lang/crates.io-index" 1942 + checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1943 + dependencies = [ 1944 + "proc-macro2", 1945 + "quote", 1946 + "version_check", 1947 + ] 1948 + 1949 + [[package]] 1831 1950 name = "proc-macro-hack" 1832 1951 version = "0.5.19" 1833 1952 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1835 1954 1836 1955 [[package]] 1837 1956 name = "proc-macro2" 1838 - version = "1.0.36" 1957 + version = "1.0.39" 1839 1958 source = "registry+https://github.com/rust-lang/crates.io-index" 1840 - checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" 1959 + checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" 1841 1960 dependencies = [ 1842 - "unicode-xid", 1961 + "unicode-ident", 1843 1962 ] 1844 1963 1845 1964 [[package]] ··· 1879 1998 1880 1999 [[package]] 1881 2000 name = "quote" 1882 - version = "1.0.16" 2001 + version = "1.0.18" 1883 2002 source = "registry+https://github.com/rust-lang/crates.io-index" 1884 - checksum = "b4af2ec4714533fcdf07e886f17025ace8b997b9ce51204ee69b6da831c3da57" 2003 + checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" 1885 2004 dependencies = [ 1886 2005 "proc-macro2", 1887 2006 ] ··· 1946 2065 source = "registry+https://github.com/rust-lang/crates.io-index" 1947 2066 checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1948 2067 dependencies = [ 1949 - "getrandom 0.2.5", 2068 + "getrandom 0.2.6", 1950 2069 ] 1951 2070 1952 2071 [[package]] ··· 1969 2088 1970 2089 [[package]] 1971 2090 name = "redox_syscall" 1972 - version = "0.2.11" 2091 + version = "0.2.13" 1973 2092 source = "registry+https://github.com/rust-lang/crates.io-index" 1974 - checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" 2093 + checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" 1975 2094 dependencies = [ 1976 2095 "bitflags", 1977 2096 ] 1978 2097 1979 2098 [[package]] 1980 2099 name = "redox_users" 1981 - version = "0.4.2" 2100 + version = "0.4.3" 1982 2101 source = "registry+https://github.com/rust-lang/crates.io-index" 1983 - checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55" 2102 + checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1984 2103 dependencies = [ 1985 - "getrandom 0.2.5", 2104 + "getrandom 0.2.6", 1986 2105 "redox_syscall", 1987 2106 "thiserror", 1988 2107 ] 1989 2108 1990 2109 [[package]] 1991 2110 name = "regex" 1992 - version = "1.5.5" 2111 + version = "1.5.6" 1993 2112 source = "registry+https://github.com/rust-lang/crates.io-index" 1994 - checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" 2113 + checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" 1995 2114 dependencies = [ 1996 2115 "aho-corasick", 1997 2116 "memchr", ··· 2000 2119 2001 2120 [[package]] 2002 2121 name = "regex-syntax" 2003 - version = "0.6.25" 2122 + version = "0.6.26" 2004 2123 source = "registry+https://github.com/rust-lang/crates.io-index" 2005 - checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 2124 + checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" 2006 2125 2007 2126 [[package]] 2008 2127 name = "remove_dir_all" ··· 2080 2199 2081 2200 [[package]] 2082 2201 name = "ryu" 2083 - version = "1.0.9" 2202 + version = "1.0.10" 2084 2203 source = "registry+https://github.com/rust-lang/crates.io-index" 2085 - checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" 2204 + checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" 2086 2205 2087 2206 [[package]] 2088 2207 name = "safemem" ··· 2101 2220 2102 2221 [[package]] 2103 2222 name = "schannel" 2104 - version = "0.1.19" 2223 + version = "0.1.20" 2105 2224 source = "registry+https://github.com/rust-lang/crates.io-index" 2106 - checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 2225 + checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" 2107 2226 dependencies = [ 2108 2227 "lazy_static", 2109 - "winapi", 2228 + "windows-sys", 2110 2229 ] 2111 2230 2112 2231 [[package]] ··· 2166 2285 2167 2286 [[package]] 2168 2287 name = "semver" 2169 - version = "1.0.6" 2288 + version = "1.0.9" 2170 2289 source = "registry+https://github.com/rust-lang/crates.io-index" 2171 - checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" 2290 + checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" 2172 2291 2173 2292 [[package]] 2174 2293 name = "serde" 2175 - version = "1.0.136" 2294 + version = "1.0.137" 2176 2295 source = "registry+https://github.com/rust-lang/crates.io-index" 2177 - checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" 2296 + checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" 2178 2297 dependencies = [ 2179 2298 "serde_derive", 2180 2299 ] ··· 2191 2310 2192 2311 [[package]] 2193 2312 name = "serde_derive" 2194 - version = "1.0.136" 2313 + version = "1.0.137" 2195 2314 source = "registry+https://github.com/rust-lang/crates.io-index" 2196 - checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" 2315 + checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" 2197 2316 dependencies = [ 2198 2317 "proc-macro2", 2199 2318 "quote", ··· 2215 2334 2216 2335 [[package]] 2217 2336 name = "serde_json" 2218 - version = "1.0.79" 2337 + version = "1.0.81" 2219 2338 source = "registry+https://github.com/rust-lang/crates.io-index" 2220 - checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" 2339 + checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" 2221 2340 dependencies = [ 2222 - "itoa 1.0.1", 2341 + "itoa 1.0.2", 2223 2342 "ryu", 2224 2343 "serde", 2225 2344 ] ··· 2231 2350 checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2232 2351 dependencies = [ 2233 2352 "form_urlencoded", 2234 - "itoa 1.0.1", 2353 + "itoa 1.0.2", 2235 2354 "ryu", 2236 2355 "serde", 2237 2356 ] 2238 2357 2239 2358 [[package]] 2240 2359 name = "serde_yaml" 2241 - version = "0.8.23" 2360 + version = "0.8.24" 2242 2361 source = "registry+https://github.com/rust-lang/crates.io-index" 2243 - checksum = "a4a521f2940385c165a24ee286aa8599633d162077a54bdcae2a6fd5a7bfa7a0" 2362 + checksum = "707d15895415db6628332b737c838b88c598522e4dc70647e59b72312924aebc" 2244 2363 dependencies = [ 2245 2364 "indexmap", 2246 2365 "ryu", ··· 2271 2390 ] 2272 2391 2273 2392 [[package]] 2393 + name = "sha-1" 2394 + version = "0.10.0" 2395 + source = "registry+https://github.com/rust-lang/crates.io-index" 2396 + checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" 2397 + dependencies = [ 2398 + "cfg-if", 2399 + "cpufeatures", 2400 + "digest 0.10.3", 2401 + ] 2402 + 2403 + [[package]] 2274 2404 name = "sha2" 2275 2405 version = "0.9.9" 2276 2406 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2327 2457 2328 2458 [[package]] 2329 2459 name = "slab" 2330 - version = "0.4.5" 2460 + version = "0.4.6" 2331 2461 source = "registry+https://github.com/rust-lang/crates.io-index" 2332 - checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" 2462 + checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" 2333 2463 2334 2464 [[package]] 2335 2465 name = "smallvec" ··· 2367 2497 2368 2498 [[package]] 2369 2499 name = "syn" 2370 - version = "1.0.89" 2500 + version = "1.0.96" 2371 2501 source = "registry+https://github.com/rust-lang/crates.io-index" 2372 - checksum = "ea297be220d52398dcc07ce15a209fce436d361735ac1db700cab3b6cdfb9f54" 2502 + checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" 2373 2503 dependencies = [ 2374 2504 "proc-macro2", 2375 2505 "quote", 2376 - "unicode-xid", 2506 + "unicode-ident", 2377 2507 ] 2378 2508 2379 2509 [[package]] ··· 2443 2573 2444 2574 [[package]] 2445 2575 name = "thiserror" 2446 - version = "1.0.30" 2576 + version = "1.0.31" 2447 2577 source = "registry+https://github.com/rust-lang/crates.io-index" 2448 - checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 2578 + checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" 2449 2579 dependencies = [ 2450 2580 "thiserror-impl", 2451 2581 ] 2452 2582 2453 2583 [[package]] 2454 2584 name = "thiserror-impl" 2455 - version = "1.0.30" 2585 + version = "1.0.31" 2456 2586 source = "registry+https://github.com/rust-lang/crates.io-index" 2457 - checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 2587 + checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" 2458 2588 dependencies = [ 2459 2589 "proc-macro2", 2460 2590 "quote", ··· 2482 2612 2483 2613 [[package]] 2484 2614 name = "time" 2485 - version = "0.3.7" 2615 + version = "0.3.9" 2486 2616 source = "registry+https://github.com/rust-lang/crates.io-index" 2487 - checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" 2617 + checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" 2488 2618 dependencies = [ 2489 - "itoa 1.0.1", 2619 + "itoa 1.0.2", 2490 2620 "libc", 2491 2621 "num_threads", 2492 2622 ] 2493 2623 2494 2624 [[package]] 2495 2625 name = "tinyvec" 2496 - version = "1.5.1" 2626 + version = "1.6.0" 2497 2627 source = "registry+https://github.com/rust-lang/crates.io-index" 2498 - checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 2628 + checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2499 2629 dependencies = [ 2500 2630 "tinyvec_macros", 2501 2631 ] ··· 2508 2638 2509 2639 [[package]] 2510 2640 name = "tokio" 2511 - version = "1.17.0" 2641 + version = "1.19.2" 2512 2642 source = "registry+https://github.com/rust-lang/crates.io-index" 2513 - checksum = "2af73ac49756f3f7c01172e34a23e5d0216f6c32333757c2c61feb2bbff5a5ee" 2643 + checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" 2514 2644 dependencies = [ 2515 2645 "bytes", 2516 2646 "libc", ··· 2528 2658 2529 2659 [[package]] 2530 2660 name = "tokio-macros" 2531 - version = "1.7.0" 2661 + version = "1.8.0" 2532 2662 source = "registry+https://github.com/rust-lang/crates.io-index" 2533 - checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" 2663 + checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" 2534 2664 dependencies = [ 2535 2665 "proc-macro2", 2536 2666 "quote", ··· 2560 2690 2561 2691 [[package]] 2562 2692 name = "tokio-util" 2563 - version = "0.6.9" 2693 + version = "0.6.10" 2564 2694 source = "registry+https://github.com/rust-lang/crates.io-index" 2565 - checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" 2695 + checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" 2566 2696 dependencies = [ 2567 2697 "bytes", 2568 2698 "futures-core", ··· 2574 2704 2575 2705 [[package]] 2576 2706 name = "tokio-util" 2577 - version = "0.7.0" 2707 + version = "0.7.3" 2578 2708 source = "registry+https://github.com/rust-lang/crates.io-index" 2579 - checksum = "64910e1b9c1901aaf5375561e35b9c057d95ff41a44ede043a03e09279eabaf1" 2709 + checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" 2580 2710 dependencies = [ 2581 2711 "bytes", 2582 2712 "futures-core", 2583 2713 "futures-sink", 2584 - "log", 2585 2714 "pin-project-lite", 2586 2715 "tokio", 2716 + "tracing", 2587 2717 ] 2588 2718 2589 2719 [[package]] ··· 2601 2731 "rand 0.8.5", 2602 2732 "slab", 2603 2733 "tokio", 2604 - "tokio-util 0.7.0", 2734 + "tokio-util 0.7.3", 2605 2735 "tower-layer", 2606 2736 "tower-service", 2607 2737 "tracing", ··· 2609 2739 2610 2740 [[package]] 2611 2741 name = "tower-http" 2742 + version = "0.1.3" 2743 + source = "registry+https://github.com/rust-lang/crates.io-index" 2744 + checksum = "81eca72647e58054bbfa41e6f297c23436f1c60aff6e5eb38455a0f9ca420bb5" 2745 + dependencies = [ 2746 + "bytes", 2747 + "futures-core", 2748 + "futures-util", 2749 + "http", 2750 + "http-body", 2751 + "pin-project", 2752 + "tower-layer", 2753 + "tower-service", 2754 + ] 2755 + 2756 + [[package]] 2757 + name = "tower-http" 2612 2758 version = "0.3.4" 2613 2759 source = "registry+https://github.com/rust-lang/crates.io-index" 2614 2760 checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" ··· 2629 2775 "percent-encoding", 2630 2776 "pin-project-lite", 2631 2777 "tokio", 2632 - "tokio-util 0.7.0", 2778 + "tokio-util 0.7.3", 2633 2779 "tower", 2634 2780 "tower-layer", 2635 2781 "tower-service", 2636 2782 "tracing", 2637 - "uuid 1.0.0", 2783 + "uuid 1.1.1", 2638 2784 ] 2639 2785 2640 2786 [[package]] ··· 2651 2797 2652 2798 [[package]] 2653 2799 name = "tracing" 2654 - version = "0.1.32" 2800 + version = "0.1.35" 2655 2801 source = "registry+https://github.com/rust-lang/crates.io-index" 2656 - checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" 2802 + checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" 2657 2803 dependencies = [ 2658 2804 "cfg-if", 2659 2805 "log", ··· 2664 2810 2665 2811 [[package]] 2666 2812 name = "tracing-attributes" 2667 - version = "0.1.20" 2813 + version = "0.1.21" 2668 2814 source = "registry+https://github.com/rust-lang/crates.io-index" 2669 - checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" 2815 + checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" 2670 2816 dependencies = [ 2671 2817 "proc-macro2", 2672 2818 "quote", ··· 2675 2821 2676 2822 [[package]] 2677 2823 name = "tracing-core" 2678 - version = "0.1.23" 2824 + version = "0.1.27" 2679 2825 source = "registry+https://github.com/rust-lang/crates.io-index" 2680 - checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" 2826 + checksum = "7709595b8878a4965ce5e87ebf880a7d39c9afc6837721b21a5a816a8117d921" 2681 2827 dependencies = [ 2682 - "lazy_static", 2828 + "once_cell", 2683 2829 "valuable", 2684 2830 ] 2685 2831 ··· 2705 2851 2706 2852 [[package]] 2707 2853 name = "tracing-log" 2708 - version = "0.1.2" 2854 + version = "0.1.3" 2709 2855 source = "registry+https://github.com/rust-lang/crates.io-index" 2710 - checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" 2856 + checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" 2711 2857 dependencies = [ 2712 2858 "lazy_static", 2713 2859 "log", ··· 2779 2925 2780 2926 [[package]] 2781 2927 name = "unicode-bidi" 2782 - version = "0.3.7" 2928 + version = "0.3.8" 2783 2929 source = "registry+https://github.com/rust-lang/crates.io-index" 2784 - checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" 2930 + checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" 2931 + 2932 + [[package]] 2933 + name = "unicode-ident" 2934 + version = "1.0.0" 2935 + source = "registry+https://github.com/rust-lang/crates.io-index" 2936 + checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" 2785 2937 2786 2938 [[package]] 2787 2939 name = "unicode-normalization" ··· 2799 2951 checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 2800 2952 2801 2953 [[package]] 2802 - name = "unicode-xid" 2803 - version = "0.2.2" 2804 - source = "registry+https://github.com/rust-lang/crates.io-index" 2805 - checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 2806 - 2807 - [[package]] 2808 2954 name = "unicode_categories" 2809 2955 version = "0.1.1" 2810 2956 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2828 2974 source = "registry+https://github.com/rust-lang/crates.io-index" 2829 2975 checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" 2830 2976 dependencies = [ 2831 - "getrandom 0.2.5", 2977 + "getrandom 0.2.6", 2832 2978 "serde", 2833 2979 ] 2834 2980 2835 2981 [[package]] 2836 2982 name = "uuid" 2837 - version = "1.0.0" 2983 + version = "1.1.1" 2838 2984 source = "registry+https://github.com/rust-lang/crates.io-index" 2839 - checksum = "8cfcd319456c4d6ea10087ed423473267e1a071f3bc0aa89f80d60997843c6f0" 2985 + checksum = "c6d5d669b51467dcf7b2f1a796ce0f955f05f01cafda6c19d6e95f730df29238" 2840 2986 dependencies = [ 2841 - "getrandom 0.2.5", 2987 + "getrandom 0.2.6", 2842 2988 ] 2843 2989 2844 2990 [[package]] ··· 2906 3052 2907 3053 [[package]] 2908 3054 name = "wasm-bindgen" 2909 - version = "0.2.79" 3055 + version = "0.2.80" 2910 3056 source = "registry+https://github.com/rust-lang/crates.io-index" 2911 - checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" 3057 + checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" 2912 3058 dependencies = [ 2913 3059 "cfg-if", 2914 3060 "wasm-bindgen-macro", ··· 2916 3062 2917 3063 [[package]] 2918 3064 name = "wasm-bindgen-backend" 2919 - version = "0.2.79" 3065 + version = "0.2.80" 2920 3066 source = "registry+https://github.com/rust-lang/crates.io-index" 2921 - checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" 3067 + checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" 2922 3068 dependencies = [ 2923 3069 "bumpalo", 2924 3070 "lazy_static", ··· 2931 3077 2932 3078 [[package]] 2933 3079 name = "wasm-bindgen-futures" 2934 - version = "0.4.29" 3080 + version = "0.4.30" 2935 3081 source = "registry+https://github.com/rust-lang/crates.io-index" 2936 - checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" 3082 + checksum = "6f741de44b75e14c35df886aff5f1eb73aa114fa5d4d00dcd37b5e01259bf3b2" 2937 3083 dependencies = [ 2938 3084 "cfg-if", 2939 3085 "js-sys", ··· 2943 3089 2944 3090 [[package]] 2945 3091 name = "wasm-bindgen-macro" 2946 - version = "0.2.79" 3092 + version = "0.2.80" 2947 3093 source = "registry+https://github.com/rust-lang/crates.io-index" 2948 - checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" 3094 + checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" 2949 3095 dependencies = [ 2950 3096 "quote", 2951 3097 "wasm-bindgen-macro-support", ··· 2953 3099 2954 3100 [[package]] 2955 3101 name = "wasm-bindgen-macro-support" 2956 - version = "0.2.79" 3102 + version = "0.2.80" 2957 3103 source = "registry+https://github.com/rust-lang/crates.io-index" 2958 - checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" 3104 + checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" 2959 3105 dependencies = [ 2960 3106 "proc-macro2", 2961 3107 "quote", ··· 2966 3112 2967 3113 [[package]] 2968 3114 name = "wasm-bindgen-shared" 2969 - version = "0.2.79" 3115 + version = "0.2.80" 2970 3116 source = "registry+https://github.com/rust-lang/crates.io-index" 2971 - checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" 3117 + checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" 2972 3118 2973 3119 [[package]] 2974 3120 name = "web-sys" 2975 - version = "0.3.56" 3121 + version = "0.3.57" 2976 3122 source = "registry+https://github.com/rust-lang/crates.io-index" 2977 - checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" 3123 + checksum = "7b17e741662c70c8bd24ac5c5b18de314a2c26c32bf8346ee1e6f53de919c283" 2978 3124 dependencies = [ 2979 3125 "js-sys", 2980 3126 "wasm-bindgen", ··· 3013 3159 3014 3160 [[package]] 3015 3161 name = "windows-sys" 3016 - version = "0.32.0" 3162 + version = "0.36.1" 3017 3163 source = "registry+https://github.com/rust-lang/crates.io-index" 3018 - checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" 3164 + checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 3019 3165 dependencies = [ 3020 3166 "windows_aarch64_msvc", 3021 3167 "windows_i686_gnu", ··· 3026 3172 3027 3173 [[package]] 3028 3174 name = "windows_aarch64_msvc" 3029 - version = "0.32.0" 3175 + version = "0.36.1" 3030 3176 source = "registry+https://github.com/rust-lang/crates.io-index" 3031 - checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" 3177 + checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 3032 3178 3033 3179 [[package]] 3034 3180 name = "windows_i686_gnu" 3035 - version = "0.32.0" 3181 + version = "0.36.1" 3036 3182 source = "registry+https://github.com/rust-lang/crates.io-index" 3037 - checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" 3183 + checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 3038 3184 3039 3185 [[package]] 3040 3186 name = "windows_i686_msvc" 3041 - version = "0.32.0" 3187 + version = "0.36.1" 3042 3188 source = "registry+https://github.com/rust-lang/crates.io-index" 3043 - checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" 3189 + checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 3044 3190 3045 3191 [[package]] 3046 3192 name = "windows_x86_64_gnu" 3047 - version = "0.32.0" 3193 + version = "0.36.1" 3048 3194 source = "registry+https://github.com/rust-lang/crates.io-index" 3049 - checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" 3195 + checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 3050 3196 3051 3197 [[package]] 3052 3198 name = "windows_x86_64_msvc" 3053 - version = "0.32.0" 3199 + version = "0.36.1" 3054 3200 source = "registry+https://github.com/rust-lang/crates.io-index" 3055 - checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" 3201 + checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 3056 3202 3057 3203 [[package]] 3058 3204 name = "winreg" ··· 3076 3222 name = "xesite" 3077 3223 version = "2.4.0" 3078 3224 dependencies = [ 3079 - "axum", 3225 + "axum 0.5.7", 3080 3226 "axum-extra", 3081 3227 "axum-macros", 3082 3228 "cfcache", ··· 3098 3244 "lazy_static", 3099 3245 "log", 3100 3246 "lol_html", 3247 + "maud", 3101 3248 "mi", 3102 3249 "mime", 3103 3250 "patreon", ··· 3105 3252 "pretty_env_logger", 3106 3253 "prometheus", 3107 3254 "rand 0.8.5", 3255 + "regex", 3108 3256 "reqwest", 3109 3257 "ructe", 3110 3258 "sdnotify", ··· 3117 3265 "tokio", 3118 3266 "tokio-stream", 3119 3267 "tower", 3120 - "tower-http", 3268 + "tower-http 0.3.4", 3121 3269 "tracing", 3122 3270 "tracing-futures", 3123 3271 "tracing-subscriber",
+3 -1
Cargo.toml
··· 9 9 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 10 10 11 11 [dependencies] 12 - axum = "0.5" 12 + axum = { version = "0.5", features = ["headers"] } 13 13 axum-macros = "0.2" 14 14 axum-extra = "0.3" 15 15 color-eyre = "0.6" ··· 28 28 lazy_static = "1.4" 29 29 log = "0.4" 30 30 lol_html = "0.3" 31 + maud = { version = "0.23.0", features = ["axum"] } 31 32 mime = "0.3.0" 32 33 prometheus = { version = "0.13", default-features = false, features = ["process"] } 33 34 rand = "0" 35 + regex = "1" 34 36 reqwest = { version = "0.11", features = ["json"] } 35 37 serde_dhall = "0.11.1" 36 38 serde = { version = "1", features = ["derive"] }
+101
blog/site-update-hero-images.markdown
··· 1 + --- 2 + title: "Site Update: Hero Images" 3 + date: 2022-06-08 4 + --- 5 + 6 + For a while I've been wondering how I can add dramatic flair to my website with 7 + so-called "hero images". These images are tools that let you describe the mood a 8 + website wants to evoke. I've been unsure how to best implement these on my 9 + website for a while, but with the advent of MidJourney and other image 10 + generation APIs/algorithms I think I have found a way to create these without 11 + too much effort on my part and the results are pretty fantastic: 12 + 13 + <xeblog-hero file="secret-to-life" prompt="the secret to life, the universe and everything, concept art"></xeblog-hero> 14 + 15 + I have generated a bunch of other images that I'm going to use for my other 16 + posts. I'll give out a desktop wallpaper sized version of each of these images 17 + on my [Patreon](https://patreon.com/cadey). 18 + 19 + Under the hood this is powered by 20 + [lol_html](https://github.com/cloudflare/lol-html) and 21 + [Maud](https://maud.lambda.xyz/). The magic is mostly contained in a function 22 + that generates a `<figure>` HTML element (which I just learned exists today). I 23 + use a function that looks like this for generating the `<xeblog-hero>` snippets: 24 + 25 + ```rust 26 + pub fn xeblog_hero(file: String, prompt: Option<String>) -> Markup { 27 + html! { 28 + figure.hero style="margin:0" { 29 + picture style="margin:0" { 30 + source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".avif"}; 31 + source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".webp"}; 32 + img style="padding:0" alt={"hero image " (file)} src={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) "-smol.png"}; 33 + } 34 + figcaption { "Image generated by MidJourney" @if let Some(prompt) = prompt { " -- " (prompt) } } 35 + } 36 + } 37 + } 38 + ``` 39 + 40 + I have it wired up with lol_html like this: 41 + 42 + ```rust 43 + lol_html::element!("xeblog-hero", |el| { 44 + let file = el.get_attribute("file").expect("wanted xeblog-hero to contain file"); 45 + el.replace(&crate::tmpl::xeblog_hero(file, el.get_attribute("prompt")).0, ContentType::Html); 46 + Ok(()) 47 + }) 48 + ``` 49 + 50 + The result is that I can declare hero images with HTML fragments like this: 51 + 52 + ```html 53 + <xeblog-hero file="miku-dark-souls" prompt="hatsune miku, elden ring, dark souls, concept art, crowbar"></xeblog-hero> 54 + ``` 55 + 56 + And I get this: 57 + 58 + <xeblog-hero file="miku-dark-souls" prompt="hatsune miku, elden ring, dark souls, concept art, crowbar"></xeblog-hero> 59 + 60 + <xeblog-conv name="Mara" mood="hacker">This is powered by the 61 + [`<figure>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure) 62 + tag, which is a new discovery to us. This is probably one of the most useful 63 + tags we never knew about and removed the need to write a bunch of annoying CSS 64 + and HTML.</xeblog-conv> 65 + 66 + The webp and AVIF versions of the hero images have a higher resolution version 67 + so that it looks nicer on retina screens. However, the png versions of these are 68 + locked to a resolution of 800x356 pixels because I was unable to crush them 69 + below a size of half a megabyte at full resolution. Realistically, this should 70 + only affect older browsers on slower hardware, so I don't expect this to have 71 + too much impact on most users. 72 + 73 + <xeblog-conv name="Cadey" mood="coffee">If you don't want to see these hero 74 + images, you can remove them with a userstyle like this: 75 + ```css 76 + figure.hero { 77 + display: none; 78 + } 79 + ``` 80 + </xeblog-conv> 81 + 82 + I'm likely going to convert over most of my website templates to use Maud. I'm 83 + very happy with it and I think it is incredibly useful to express your HTML in 84 + Rust instead of something that has to be compiled to Rust. In practice it 85 + reminds me of the Nim library [emerald](http://flyx.github.io/emerald/), which 86 + lets you write HTML using Nim functions similar to how you use Maud. 87 + 88 + Here's a few more examples of hero images I have generated: 89 + 90 + <xeblog-hero file="the-forbidden-shape" prompt="the forbidden shape"></xeblog-hero> 91 + 92 + <xeblog-hero file="great-wave-cyberpunk" prompt="the great wave off of kanagawa, cyberpunk, hanzi inscription"></xeblog-hero> 93 + 94 + Normally I will only have one image per post and it will usually be after the 95 + introduction paragraph. The prompt will usually be related to the article topic, 96 + but sometimes I will take artistic liberty. If you have suggestions for prompts, 97 + please [contact me](/contact) with those ideas. 98 + 99 + I hope these updates on how I've been messing with my site are interesting. I'm 100 + trying to capture the spirit of how I'm implementing these changes as well as 101 + details of how everything fits together.
+7 -2
src/app/markdown.rs
··· 7 7 ComrakPlugins, 8 8 }; 9 9 use lazy_static::lazy_static; 10 - use lol_html::{rewrite_str, element, RewriteStrSettings, html_content::ContentType}; 10 + use lol_html::{element, html_content::ContentType, rewrite_str, RewriteStrSettings}; 11 11 use std::cell::RefCell; 12 12 use url::Url; 13 13 ··· 80 80 let name = el.get_attribute("name").expect("wanted xeblog-conv to contain name"); 81 81 let name_lower = name.clone().to_lowercase(); 82 82 let mood = el.get_attribute("mood").expect("wanted xeblog-conv to contain mood"); 83 - 83 + 84 84 el.before(&format!(r#" 85 85 <div class="conversation"> 86 86 <div class="conversation-picture conversation-smol"> ··· 94 94 el.after("</div></div>", ContentType::Html); 95 95 96 96 el.remove_and_keep_content(); 97 + Ok(()) 98 + }), 99 + element!("xeblog-hero", |el| { 100 + let file = el.get_attribute("file").expect("wanted xeblog-hero to contain file"); 101 + el.replace(&crate::tmpl::xeblog_hero(file, el.get_attribute("prompt")).0, ContentType::Html); 97 102 Ok(()) 98 103 }) 99 104 ],
+11 -2
src/handlers/blog.rs
··· 4 4 extract::{Extension, Path}, 5 5 response::Html, 6 6 }; 7 + use http::HeaderMap; 7 8 use lazy_static::lazy_static; 8 9 use prometheus::{opts, register_int_counter_vec, IntCounterVec}; 9 10 use std::sync::Arc; ··· 72 73 Ok(Html(result)) 73 74 } 74 75 75 - #[instrument(skip(state))] 76 + #[instrument(skip(state, headers))] 76 77 pub async fn post_view( 77 78 Path(name): Path<String>, 78 79 Extension(state): Extension<Arc<State>>, 80 + headers: HeaderMap, 79 81 ) -> Result { 80 82 let mut want: Option<Post> = None; 81 83 ··· 85 87 } 86 88 } 87 89 90 + let referer = if let Some(referer) = headers.get(http::header::REFERER) { 91 + let referer = referer.to_str()?.to_string(); 92 + Some(referer) 93 + } else { 94 + None 95 + }; 96 + 88 97 match want { 89 98 None => Err(super::Error::PostNotFound(name)), 90 99 Some(post) => { ··· 93 102 .inc(); 94 103 let body = templates::Html(post.body_html.clone()); 95 104 let mut result: Vec<u8> = vec![]; 96 - templates::blogpost_html(&mut result, post, body)?; 105 + templates::blogpost_html(&mut result, post, body, referer)?; 97 106 Ok(Html(result)) 98 107 } 99 108 }
+3
src/handlers/mod.rs
··· 130 130 131 131 #[error("axum http error: {0}")] 132 132 AxumHTTP(#[from] axum::http::Error), 133 + 134 + #[error("string conversion error: {0}")] 135 + ToStr(#[from] http::header::ToStrError), 133 136 } 134 137 135 138 pub type Result<T = Html<Vec<u8>>> = std::result::Result<T, Error>;
+1
src/main.rs
··· 30 30 pub mod handlers; 31 31 pub mod post; 32 32 pub mod signalboost; 33 + pub mod tmpl; 33 34 34 35 mod domainsocket; 35 36 use domainsocket::*;
+38
src/tmpl/mod.rs
··· 1 + use maud::{html, Markup}; 2 + 3 + pub mod nag; 4 + 5 + pub fn xeblog_hero(file: String, prompt: Option<String>) -> Markup { 6 + html! { 7 + figure.hero style="margin:0" { 8 + picture style="margin:0" { 9 + source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".avif"}; 10 + source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) ".webp"}; 11 + img style="padding:0" alt={"hero image " (file)} src={"https://cdn.xeiaso.net/file/christine-static/hero/" (file) "-smol.png"}; 12 + } 13 + figcaption { "Image generated by MidJourney" @if let Some(prompt) = prompt { " -- " (prompt) } } 14 + } 15 + } 16 + } 17 + 18 + pub fn xeblog_conv(name: String, mood: String, body: Markup) -> Markup { 19 + let name_lower = name.clone().to_lowercase(); 20 + 21 + html! { 22 + .conversation { 23 + ."conversation-picture"."conversation-smol" { 24 + picture { 25 + source type="image/avif" srcset={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".avif"}; 26 + source type="image/webp" srcset={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".webp"}; 27 + img alt={(name) " is " (mood)} src={"https://cdn.xeiaso.net/file/christine-static/stickers/" (name_lower) "/" (mood) ".png"}; 28 + } 29 + } 30 + ."conversation-chat" { 31 + "<" 32 + b { (name) } 33 + "> " 34 + (body) 35 + } 36 + } 37 + } 38 + }
+66
src/tmpl/nag.rs
··· 1 + use super::xeblog_conv; 2 + use crate::post::Post; 3 + use chrono::prelude::*; 4 + use lazy_static::lazy_static; 5 + use maud::{html, Markup}; 6 + use regex::Regex; 7 + 8 + lazy_static! { 9 + static ref HN: Regex = Regex::new(r#"^https?://news.ycombinator.com"#).unwrap(); 10 + static ref REDDIT: Regex = Regex::new(r#"^https?://((.+).)?reddit.com"#).unwrap(); 11 + } 12 + 13 + pub fn referer(referer: Option<String>) -> Markup { 14 + if referer.is_none() { 15 + return html! {}; 16 + } 17 + 18 + let referer = referer.unwrap(); 19 + 20 + let nag = html! { 21 + script r#async src="https://media.ethicalads.io/media/client/ethicalads.min.js" { "" } 22 + div.adaptive data-ea-publisher="christinewebsite" data-ea-type="image" data-ea-style="stickybox" { 23 + .warning { 24 + (xeblog_conv( 25 + "Cadey".into(), 26 + "coffee".into(), 27 + html! { 28 + "Hello! Thank you for visiting my website. You seem to be visiting from a news aggregator and have ads disabled. These ads help pay for running the website and are done by " 29 + a href="https://www.ethicalads.io/" { "Ethical Ads" } 30 + ". I do not receive detailed analytics on the ads and from what I understand neither does Ethical Ads. If you don't want to disable your ad blocker, please consider donating on " 31 + a href="https://patreon.com/cadey" { "Patreon" } 32 + ". It helps fund the website's hosting bills and pay for the expensive technical editor that I use for my longer articles. Thanks and be well!" 33 + }, 34 + )) 35 + } 36 + } 37 + }; 38 + 39 + if HN.is_match(&referer) { 40 + return nag; 41 + } 42 + 43 + if REDDIT.is_match(&referer) { 44 + return nag; 45 + } 46 + 47 + html! {} 48 + } 49 + 50 + pub fn prerelease(post: &Post) -> Markup { 51 + if Utc::today().num_days_from_ce() < post.date.num_days_from_ce() { 52 + html! { 53 + .warning { 54 + (xeblog_conv("Mara".into(), "hacker".into(), html!{ 55 + "Hey, this post is set to go live on " 56 + (format!("{}", post.detri())) 57 + " UTC. Right now you are reading a pre-publication version of this post. Please do not share this on social media. This post will automatically go live for everyone on the intended publication date. If you want access to these posts, please join the " 58 + a href="https://patreon.com/cadey" { "Patreon" } 59 + ". It helps me afford the copyeditor that I contract for the technical content I write." 60 + })) 61 + } 62 + } 63 + } else { 64 + html! {} 65 + } 66 + }
+5 -17
templates/blogpost.rs.html
··· 1 - @use super::{header_html, footer_html, mara}; 2 - @use crate::post::Post; 3 - @use chrono::prelude::*; 1 + @use super::{header_html, footer_html}; 2 + @use crate::{post::Post, tmpl::nag}; 4 3 5 - @(post: Post, body: impl ToHtml) 4 + @(post: Post, body: impl ToHtml, referer: Option<String>) 6 5 7 6 @:header_html(Some(&post.front_matter.title.clone()), None) 8 7 ··· 26 25 } else { 27 26 <link rel="canonical" href="@post.front_matter.redirect_to.as_ref().unwrap()" /> 28 27 } 29 - 30 - <script type="module" src="/static/js/conversation.js"></script> 31 28 32 29 <script type="application/ld+json"> 33 30 @{ ··· 59 56 </script> 60 57 } 61 58 62 - <div id="refererNotice"></div> 63 - <script type="module" src="/static/js/hnwarn.js"></script> 59 + @Html(nag::referer(referer).0) 64 60 65 61 <h1>@post.front_matter.title</h1> 66 62 67 - @if Utc::today().num_days_from_ce() < post.date.num_days_from_ce() { 68 - <div class="warning"> 69 - @:mara("hacker", "Mara", Html(format!(r#"Hey, this post is set to go live to the public on {} UTC. Right now you are reading a pre-publication version of this post. Please do not share this on social media. This post will automatically go live for everyone on the intended publication date. If you want access to these posts, please join the <a href="https://patreon.com/cadey">Patreon</a>. It helps me afford the copyeditor that I contract for the technical content I write."#, post.detri()))) 70 - </div> 71 - } else { 72 - <script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script> 73 - } 63 + @Html(nag::prerelease(&post).0) 74 64 75 65 <small>A @post.read_time_estimate_minutes minute read.</small> 76 66 77 67 @body 78 - 79 - <div class="adaptive" data-ea-publisher="christinewebsite" data-ea-type="image" data-ea-style="stickybox"></div> 80 68 81 69 <hr /> 82 70