admin: fix Decap render (script in body, yaml MIME), Gitea OAuth backend + CORS, simple workflow

This commit is contained in:
sam
2026-09-09 07:42:03 +10:00
parent 9ca027c86f
commit 2ec6a358c2
3 changed files with 19 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ package main
import (
"embed"
"log"
"mime"
"net/http"
"os"
)
@@ -15,6 +16,10 @@ import (
var web embed.FS
func main() {
// Decap CMS requires config.yml served as a YAML content type (it checks the header).
_ = mime.AddExtensionType(".yml", "application/yaml")
_ = mime.AddExtensionType(".yaml", "application/yaml")
root := os.Getenv("KONTRA_CONTENT")
if root == "" {
root = "content"