collections via config

This commit is contained in:
Sebastian Frank
2019-03-10 13:26:26 +01:00
parent 7f9910244b
commit e3dfbcb591
6 changed files with 77 additions and 17 deletions

View File

@@ -6,11 +6,20 @@ import (
"github.com/imdario/mergo"
)
// CollectionConfig describes a collection
type CollectionConfig struct {
Name *string `yaml:"Name"`
URL *string `yaml:"URL"`
GoToTemplate *string `yaml:"GoToTemplate"`
RegisterNav *bool `yaml:"RegisterNav"`
}
// ThisPathConfig is struct for This in paths yaml
type ThisPathConfig struct {
Navname *string `yaml:"Navname"`
GoTo *string `yaml:"GoTo"`
Data interface{} `yaml:"Data"`
Navname *string `yaml:"Navname"`
GoTo *string `yaml:"GoTo"`
Collections []*CollectionConfig `yaml:"Collections"`
Data interface{} `yaml:"Data"`
}
// IndexConfig describes index input and output file
@@ -78,6 +87,8 @@ type PathConfigTree struct {
OutputPath string
Hidden bool // for collections which are not part of the navigation
ColMap map[string]interface{}
InputFiles []string
OtherFiles []string