Documentation
¶
Overview ¶
Package config provides the structure of toml and yaml metadata found in collections (main site index), books (book index) and chapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { Root string `toml:-` ID string `toml:"id,omitempty"` Title string `toml:"title"` Author Author `toml:"author,omitempty"` Mirrors []string `toml:"mirrors,omitempty"` ShortDescription string `toml:"shortDescription,omitempty"` Genre []string `toml:"genre,omitempty"` Status string `toml:"status,omitempty"` CoverPath string `toml:"coverPath,omitempty"` LanguageCode string `toml:"languageCode,omitempty"` Copyright string `toml:"copyright,omitempty"` License string `toml:"license,omitempty"` ChaptersDir string `toml:"chaptersDir"` Blurb template.HTML `toml:-` Chapters []Chapter `toml:-` StaticAssets []string `toml:-` Collection *Collection `toml:-` }
type Chapter ¶
type Chapter struct { ID string Title string Description string Published time.Time LastModified time.Time Content template.HTML Parent *Book Collection *Collection Next *Chapter Prev *Chapter }
func (Chapter) EstimatedReadingTime ¶
func (c Chapter) EstimatedReadingTime() *readingtime.Result
type Collection ¶
type Collection struct { Root string `toml:-` BooksDir string `toml:"booksDir"` LayoutDir string `toml:"layoutDir"` OutputDir string `toml:"outputDir"` StaticDir string `toml:"staticDir"` Title string `toml:"title"` BaseURL string `toml:"baseURL,omitempty"` LanguageCode string `toml:"languageCode,omitempty"` Books []Book `toml:-` }
Click to show internal directories.
Click to hide internal directories.