feat(docs): regenerate CHAMPIONS.md from champions.json in scraper

- Add saveMarkdown in markdown.go rendering the Loldle classic-mode column
  table (Champion | Gender | Genre | Range | Resource | Region | Lane | Year).
- main.go writes CHAMPIONS.md after champions.json on every scrape.
- update-champions.yml stages CHAMPIONS.md alongside champions.json so CI
  commits both in lockstep.
- alt text on tile images now uses champion display name (e.g. Bel'Veth)
  instead of the ID slug.
This commit is contained in:
tiennm99 committed 2026-04-21 10:03:07 +07:00
1 parent 3824945eaa
commit c446f08c2f
4 files changed
+141 -23

No files matched your search

+6 -1
View File
@@ -45,8 +45,13 @@ func main() {
if err := saveJSON(outputPath, champions); err != nil {
log.Fatalf("Failed to save JSON: %v", err)
}
fmt.Printf("Champion data has been saved to %s\n", outputPath)
markdownPath := "CHAMPIONS.md"
if err := saveMarkdown(markdownPath, champions); err != nil {
log.Fatalf("Failed to save Markdown: %v", err)
}
fmt.Printf("Champion table has been saved to %s\n", markdownPath)
}
func saveJSON(path string, data []parser.ChampionResult) error {