ref: 750161b0281a7a9bc8c361d78d22789e55c17811
parent: 32d6d4393013b2b7b4b3e8f3f953fd796bdd12e9
author: halfwit <halfwit@hlfw.ca>
date: Thu Aug 22 17:59:27 PDT 2024
Fix letsencrypt
--- /dev/null
+++ b/bloglist
@@ -1,0 +1,30 @@
+#!/bin/rc -e
+
+. /sys/lib/hlfw/common.rc
+
+cd $1
+shift
+
+cache=/usr/web/cache/bloglist.cache
+tcache=/usr/web/cache/bloglist.cache.tmp.$pid
+if(test -e $cache && ! test $cache -older 1m){
+ exec cat $cache
+ exit
+}
+
+rfork ne
+nl='
+'
+
+{
+ prelude '' 'blog'
+ echo '<h2>Blogs</h2>'
+
+ udir=()
+ for(repo in `$nl{ls}){
+ ## sort by year, then strip the .md out
+ name=`{echo $repo | sed 's/\.md//'}
+ echo '<dt><a href="/blog/'$name'.html">'$name'</a></dt>'
+
+ }
+} | tee $tcache && mv $tcache $cache
--- a/well-known
+++ b/well-known
@@ -1,9 +1,6 @@
#!/bin/rc
-data=`{cat $1}
-echo 'HTTP/1.1 200 OK
-Content-Type: text/plain
-Content-Length: 88
+echo ''
-'$data
+cat $1