package app import ( "fmt" "slices" "strings" "git.urbach.dev/go/markdown" "git.urbach.dev/go/web" ) func RenderPost(ctx web.Context, id string) error { var ( post = Posts[id] title string content string created string tags []string ) if post != nil { title = post.Title content = post.Content created = post.Created tags = post.Tags } else { title = "Not found" content = fmt.Sprintf("Post `%s` does not exist.", id) ctx.Status(404) } head := fmt.Sprintf(`