feat(core): dynamic custom frontmatter fields for CTF writeup metadata
CI / typecheck + build (turbo) (push) Canceled after 0s

- Add extra_fields JSONB column to documents table (migration 0003)
- CreateDocInput/UpdateDocInput: extraFields?: Record<string, string>
- parseFile: extracts non-standard frontmatter keys as extraFields
- stringifyFile: writes extraFields dynamically to YAML frontmatter
- toMeta: spreads extraFields from DB row into DocumentMeta
- DocForm: '+ Add field' UI for content creators to add any metadata
- API routes: splitPayload() separates standard vs custom fields
- Doc page: CustomFieldBadges dynamically renders any custom field
- Add db:migrate / db:push scripts + deploy workflow migration step
- Add CTF writeup template (content/writeups/ctf/template/)
- Add sample DEF CON writeup with event/challenge/category/difficulty/points
- Add @tailwindcss/typography for table rendering (prose classes)
- Add remark-gfm for GitHub Flavored Markdown table parsing
This commit is contained in:
asepharyana
2026-08-20 23:18:57 +07:00
parent 8906ed55a0
commit c760c3c087
16 changed files with 580 additions and 25 deletions
+1
View File
@@ -19,6 +19,7 @@
"mcp": "bun --cwd apps/mcp run start",
"mcp:http": "/home/code/.bun/bin/bun --cwd apps/mcp src/http.ts",
"api": "/home/code/.bun/bin/bun --cwd apps/api src/index.ts",
"db:migrate": "/home/code/.bun/bin/bun --cwd packages/db run db:migrate",
"test": "turbo run test"
},
"devDependencies": {