Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FriendlyName ¶
func RenameFolder ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) AddCart ¶
func (d *Builder) AddCart(f *FrontMatter) string
func (*Builder) LessonSorter ¶
func (d *Builder) LessonSorter(pg *CompiledDocument) string
type CompiledDocument ¶
type CompiledDocument struct { *FrontMatter // these can be discarded after building the document to save memory. Contents Lesson Lesson []Lesson }
type CompiledFolder ¶
type CompiledFolder struct { Name string IndexJson Document []*FrontMatter Folder []*CompiledFolder }
type FrontMatter ¶
type FrontMatter struct { Id string `yaml:"id"` Version int `yaml:"version"` Title string `yaml:"title"` // this is the name of the folder and its sort key Subtitle string `yaml:"subtitle"` Sort string `yaml:"sort"` Image string `yaml:"image"` Link string `yaml:"link"` // not loaded, computed after a load MinGrade int `yaml:"minGrade"` MaxGrade int `yaml:"maxGrade"` IronShop []string `yaml:"ironShop"` Cart int `yaml:"cart"` // contains filtered or unexported fields }
type IndexJson ¶
type IndexJson struct { Id string `json:"id,omitempty" yaml:"id"` Version int `json:"version,omitempty" yaml:"version"` Title string `json:"title,omitempty" yaml:"title"` // this is the name of the folder and its sort key Sort string `json:"sort,omitempty"` Image string `json:"image,omitempty" yaml:"sort"` Link string `json:"link,omitempty"` // not loaded, computed after a load Union []string `json:"union,omitempty"` // union all these (probably hidden) folders Hidden bool `json:"hidden,omitempty"` Pin []*LinkInfo `json:"pin,omitempty"` Template string `json:"template,omitempty"` }
the front matter from a folder comes from index.json
type LinkInfo ¶
type LinkInfo struct { Title string `json:"title,omitempty"` Sort string `json:"sort,omitempty"` Image string `json:"image,omitempty"` // just ignored? we are using the image from the linked from, this could be default though. Path string `json:"path,omitempty"` Folder bool `json:"folder,omitempty"` Content string `json:"content,omitempty"` }
Click to show internal directories.
Click to hide internal directories.