rewrite server module

This commit is contained in:
2026-01-16 16:08:10 -05:00
parent bfb5725880
commit 7e3af14059
6 changed files with 437 additions and 8 deletions

View File

@@ -15,3 +15,17 @@ func markdownToHTML(mdText string) string {
renderer := html.NewRenderer(opts)
return string(markdown.Render(doc, renderer))
}
func basePath(base string) string {
if base == "" || base == "." {
return "/"
}
return base
}
func joinBase(base, name string) string {
if base == "" {
return "/" + name
}
return base + "/" + name
}