Documentation ¶
Index ¶
- type DeepDataMerge
- type Engine
- func (e *Engine) GenerateFeed()
- func (e *Engine) GenerateJSONIndex(outFilePath string)
- func (e *Engine) GenerateLinkStore()
- func (e *Engine) GenerateNoteJSONIdex(outFilePath string)
- func (e *Engine) GenerateNoteRoot(fileOutPath string, templ *template.Template)
- func (e *Engine) GenerateSitemap(outFilePath string)
- func (e *Engine) RenderEngineGeneratedFiles(fileOutPath string, template *template.Template)
- func (e *Engine) RenderNotes(fileOutPath string, templ *template.Template)
- func (e *Engine) RenderPage(fileOutPath string, pagePath template.URL, template *template.Template, ...)
- func (e *Engine) RenderTags(fileOutPath string, templ *template.Template)
- func (e *Engine) RenderUserDefinedPages(fileOutPath string, templ *template.Template)
- type JSONIndexTemplate
- type PageData
- type TagRootTemplateData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeepDataMerge ¶
type DeepDataMerge struct { // Templates stores the template data of all the pages of the site // Access the data for a particular page by using the relative path to the file as the key Templates map[template.URL]parser.TemplateData // Templates stores the template data of all tag sub-pages of the site Tags map[template.URL]parser.TemplateData // K-V pair storing all templates corresponding to a particular tag in the site TagsMap map[template.URL][]parser.TemplateData // Stores data parsed from layout/config.yml LayoutConfig parser.LayoutConfig // Posts contains the template data of files in the posts directory Posts []parser.TemplateData //Stores all the notes Notes map[template.URL]parser.Note //Stores the links of each note to other notes LinkStore map[template.URL][]*parser.Note // Stores the index generated for search functionality JSONIndex map[template.URL]JSONIndexTemplate }
DeepDataMerge This struct holds all the ssg data
type Engine ¶
type Engine struct { // Stores the merged ssg data DeepDataMerge DeepDataMerge // Common logger for all engine functions ErrorLogger *log.Logger }
func (*Engine) GenerateFeed ¶
func (e *Engine) GenerateFeed()
func (*Engine) GenerateJSONIndex ¶
func (*Engine) GenerateLinkStore ¶
func (e *Engine) GenerateLinkStore()
func (*Engine) GenerateNoteJSONIdex ¶
func (*Engine) GenerateNoteRoot ¶
func (*Engine) GenerateSitemap ¶
func (*Engine) RenderEngineGeneratedFiles ¶
func (*Engine) RenderNotes ¶
func (*Engine) RenderPage ¶
func (e *Engine) RenderPage(fileOutPath string, pagePath template.URL, template *template.Template, templateStartString string)
RenderPage fileOutPath - stores the parent directory to store rendered files, usually `site/`
pagePath - stores the path to write the given page without the prefix directory Eg: site/content/posts/file1.html to be passed as posts/file1.html
template - stores the HTML templates parsed from the layout/ directory
templateStartString - stores the name of the template to be passed to ExecuteTemplate()
func (*Engine) RenderTags ¶
type JSONIndexTemplate ¶
type JSONIndexTemplate struct { CompleteURL template.URL Frontmatter parser.Frontmatter Tags []string }
JSONIndexTemplate This structure is solely used for storing the JSON index
type PageData ¶
type PageData struct { DeepDataMerge DeepDataMerge PageURL template.URL }
type TagRootTemplateData ¶
type TagRootTemplateData struct { DeepDataMerge DeepDataMerge PageURL template.URL TemplateData parser.TemplateData TagNames []string }
Click to show internal directories.
Click to hide internal directories.