mark2web/config_path.go

86 lines
2.5 KiB
Go
Raw Normal View History

2019-03-18 15:14:41 +01:00
package mark2web
2019-03-11 15:29:05 +01:00
2019-03-10 13:26:26 +01:00
// CollectionConfig describes a collection
type CollectionConfig struct {
2019-03-10 16:02:53 +01:00
Name *string `yaml:"Name"`
URL *string `yaml:"URL"`
2019-03-10 16:02:53 +01:00
NavTemplate *struct {
EntriesAttribute string `yaml:"EntriesAttribute"`
GoTo string `yaml:"GoTo"`
Navname string `yaml:"Navname"`
Body string `yaml:"Body"`
DataKey string `yaml:"DataKey"`
Hidden bool `yaml:"Hidden"`
Template string `yaml:"Template"`
2019-03-12 13:24:38 +01:00
//Recursive bool `yaml:"Recursive"`
2019-03-10 16:02:53 +01:00
} `yaml:"NavTemplate"`
2019-03-10 13:26:26 +01:00
}
2019-02-28 10:43:30 +01:00
// ThisPathConfig is struct for This in paths yaml
type ThisPathConfig struct {
2019-03-10 13:26:26 +01:00
Navname *string `yaml:"Navname"`
GoTo *string `yaml:"GoTo"`
Collections []*CollectionConfig `yaml:"Collections"`
2019-03-11 15:29:05 +01:00
Data MapString `yaml:"Data"`
2019-02-28 10:43:30 +01:00
}
// IndexConfig describes index input and output file
type IndexConfig struct {
2019-02-28 15:13:59 +01:00
InputFile *string `yaml:"InputFile"`
InputString *string `yaml:"InputString"`
OutputFile *string `yaml:"OutputFile"`
2019-02-28 10:43:30 +01:00
}
// MetaData describes meta data for current site/tree node
type MetaData struct {
Title *string `yaml:"Title"`
Description *string `yaml:"Description"`
Keywords *string `yaml:"Keywords"`
}
// DirnameConfig describes how to handle directory names
type DirnameConfig struct {
Strip *string `yaml:"Strip"`
IgnoreForNav *string `yaml:"IgnoreForNav"`
}
// FilenameConfig describes how to handle filenames
type FilenameConfig struct {
Strip *string `yaml:"Strip"`
Ignore *string `yaml:"Ignore"`
OutputExtension *string `yaml:"OutputExtension"`
}
// MarkdownConfig describes markdown handling
type MarkdownConfig struct {
ChromaRenderer *bool `yaml:"ChromaRenderer"`
ChromaStyle *string `yaml:"ChromaStyle"`
}
2019-03-04 16:05:29 +01:00
// ImagingConfig defines parameter for imaging processing
type ImagingConfig struct {
Width int `yaml:"Width"`
Height int `yaml:"Height"`
Process string `yaml:"Process"`
Anchor string `yaml:"Anchor"`
Quality int `yaml:"Quality"`
TargetDir string `yaml:"-"`
Filename string `yaml:"-"`
Format string `yaml:"-"`
2019-03-04 16:05:29 +01:00
}
2019-02-28 10:43:30 +01:00
// PathConfig of subdir
type PathConfig struct {
This ThisPathConfig `yaml:"This"`
Template *string `yaml:"Template"`
Index *IndexConfig `yaml:"Index"`
Meta *MetaData `yaml:"Meta"`
Path *DirnameConfig `yaml:"Path"`
Filename *FilenameConfig `yaml:"Filename"`
Markdown *MarkdownConfig `yaml:"Markdown"`
2019-03-04 16:05:29 +01:00
Imaging *ImagingConfig `yaml:"Imaging"`
2019-02-28 10:43:30 +01:00
2019-03-11 15:29:05 +01:00
Data MapString `yaml:"Data"`
2019-02-28 10:43:30 +01:00
}