MCPcopy
hub / github.com/matryer/xbar / generateCategoryPages

Method generateCategoryPages

tools/sitegen/main.go:731–741  ·  view source on GitHub ↗
(allcategories, categories map[string]metadata.Category, pluginsByPath map[string][]metadata.Plugin)

Source from the content-addressed store, hash-verified

729}
730
731func (g *generator) generateCategoryPages(allcategories, categories map[string]metadata.Category, pluginsByPath map[string][]metadata.Plugin) error {
732 for _, category := range categories {
733 if err := g.generateCategoryPage(allcategories, category, pluginsByPath, g.pluginsDir); err != nil {
734 return err
735 }
736 if err := g.generateCategoryPages(allcategories, category.ChildrenCategories, pluginsByPath); err != nil {
737 return err
738 }
739 }
740 return nil
741}
742
743func (g *generator) generateCategoryPage(categories map[string]metadata.Category, category metadata.Category, pluginsByPath map[string][]metadata.Plugin, outputDir string) error {
744 pagePath := filepath.Join(outputDir, category.Path+".html")

Callers 1

runFunction · 0.80

Calls 1

generateCategoryPageMethod · 0.95

Tested by

no test coverage detected