finish up translations and setup doc server stuff

This commit is contained in:
ngn
2025-01-10 00:16:06 +03:00
parent ac307de76c
commit 5fb3c03e40
30 changed files with 591 additions and 104 deletions

View File

@ -6,7 +6,6 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/ngn13/website/api/config"
"github.com/russross/blackfriday/v2"
)
func IP(c *fiber.Ctx) string {
@ -20,15 +19,6 @@ func IP(c *fiber.Ctx) string {
return c.IP()
}
func Markdown(c *fiber.Ctx, raw []byte) error {
exts := blackfriday.FencedCode
exts |= blackfriday.NoEmptyLineBeforeBlock
exts |= blackfriday.HardLineBreak
c.Set("Content-Type", "text/html; charset=utf-8")
return c.Send(blackfriday.Run(raw, blackfriday.WithExtensions(exts)))
}
func JSON(c *fiber.Ctx, code int, data fiber.Map) error {
if data == nil {
data = fiber.Map{}