about summary refs log tree commit diff stats
path: root/adapter/protocol
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-28 01:37:51 +0200
committerbptato <nincsnevem662@gmail.com>2024-05-28 01:42:14 +0200
commit364ede899025549d49af6e9140e3e2b20d211fad (patch)
tree5d4702fda05f550a8a8973127784463ca42e75e5 /adapter/protocol
parentdbf52de5c226443a7e20789a414cb27a7bc6991f (diff)
downloadchawan-364ede899025549d49af6e9140e3e2b20d211fad.tar.gz
about: markdownify & update license.html
We have a markdown converter, so why not use it?
Diffstat (limited to 'adapter/protocol')
-rw-r--r--adapter/protocol/about.nim12
1 files changed, 6 insertions, 6 deletions
diff --git a/adapter/protocol/about.nim b/adapter/protocol/about.nim
index df5ae649..4f6dc97b 100644
--- a/adapter/protocol/about.nim
+++ b/adapter/protocol/about.nim
@@ -4,17 +4,17 @@ else:
   import std/os
 
 const chawan = staticRead"res/chawan.html"
-const license = staticRead"res/license.html"
+const license = staticRead"res/license.md"
 
-template printPage(s: static string) =
-  stdout.write("Content-Type: text/html\n\n")
+template printPage(s, t: static string) =
+  stdout.write("Content-Type: " & t & "\n\n")
   stdout.write(s)
 
 proc main() =
   case getEnv("MAPPED_URI_PATH")
-  of "blank": printPage("")
-  of "chawan": printPage(chawan)
-  of "license": printPage(license)
+  of "blank": printPage("", "text/plain")
+  of "chawan": printPage(chawan, "text/html")
+  of "license": printPage(license, "text/markdown")
   else: stdout.write("Cha-Control: ConnectionError 4 about page not found")
 
 main()