Documentation ¶
Index ¶
- type BuildOptions
- type Site
- func (s *Site) AbsDir() string
- func (s *Site) AddDocument(d pages.Document, output bool)
- func (s *Site) Build(options BuildOptions) (int, error)
- func (s *Site) Clean(options BuildOptions) error
- func (s *Site) Config() *config.Config
- func (s *Site) DestDir() string
- func (s *Site) Exclude(path string) bool
- func (s *Site) FilePathPage(rel string) (pages.Document, bool)
- func (s *Site) FilenameURLPath(relpath string) (string, bool)
- func (s *Site) FilenameURLs() map[string]string
- func (s *Site) KeepFile(filename string) bool
- func (s *Site) MarshalYAML() (interface{}, error)
- func (s *Site) OutputExt(pathname string) string
- func (s *Site) OutputPages() []pages.Document
- func (s *Site) Pages() (out []pages.Page)
- func (s *Site) PathPrefix() string
- func (s *Site) Read() error
- func (s *Site) ReadCollections() error
- func (s *Site) Reload() (*Site, error)
- func (s *Site) RenderingPipeline() pipelines.PipelineInterface
- func (s *Site) SaveDocumentToFile(d pages.Document, filename string) error
- func (s *Site) SavePage(p pages.Document, options BuildOptions) error
- func (s *Site) SetAbsoluteURL(url string)
- func (s *Site) Site() interface{}
- func (s *Site) SourceDir() string
- func (s *Site) TemplateEngine() *liquid.Engine
- func (s *Site) ToLiquid() interface{}
- func (s *Site) URLPage(urlpath string) (p pages.Document, found bool)
- func (s *Site) WriteDocument(w io.Writer, d pages.Document) error
- func (s *Site) WritePages(options BuildOptions) (count int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildOptions ¶
BuildOptions holds options for Build and Clean
type Site ¶
type Site struct { ConfigFile *string Collections []*collection.Collection Routes map[string]pages.Document // URL path -> Document, only for output pages sync.Mutex // contains filtered or unexported fields }
Site is a Jekyll site.
func FromDirectory ¶
FromDirectory reads the configuration file, if it exists.
func (*Site) AddDocument ¶
AddDocument adds a document to the site structures. It ignores unpublished documents unless config.Unpublished is true.
func (*Site) Build ¶
func (s *Site) Build(options BuildOptions) (int, error)
Build cleans the destination and create files in it. It attends to the global options.dry_run.
func (*Site) Clean ¶
func (s *Site) Clean(options BuildOptions) error
Clean the destination. Remove files that aren't in keep_files, and resulting empty diretories.
func (*Site) FilePathPage ¶
FilePathPage returns a Page, give a file path relative to site source directory.
func (*Site) FilenameURLPath ¶
FilenameURLPath returns a page's URL path, give a relative file path relative to the site source directory.
func (*Site) FilenameURLs ¶
FilenameURLs returns a map of site-relative pathnames to URL paths
func (*Site) KeepFile ¶
KeepFile returns a boolean indicating that clean should leave the file in the destination directory.
func (*Site) MarshalYAML ¶
MarshalYAML is part of the yaml.Marshaler interface The variables subcommand uses this.
func (*Site) OutputPages ¶
OutputPages returns a list of output pages.
func (*Site) PathPrefix ¶
PathPrefix is in the page.Container interface.
func (*Site) Read ¶
Read loads the site data and files. It doesn't load the configuration file; NewSiteFromDirectory did that.
func (*Site) ReadCollections ¶
ReadCollections reads the pages of the collections named in the site configuration. It adds each collection's pages to the site map, and creates a template site variable for each collection.
func (*Site) RenderingPipeline ¶
func (s *Site) RenderingPipeline() pipelines.PipelineInterface
RenderingPipeline returns the rendering pipeline.
func (*Site) SaveDocumentToFile ¶
SaveDocumentToFile writes a page to filename.
func (*Site) SavePage ¶
func (s *Site) SavePage(p pages.Document, options BuildOptions) error
SavePage writes a document to the destination directory. It attends to options.dry_run.
func (*Site) SetAbsoluteURL ¶
SetAbsoluteURL overrides the loaded configuration. The server uses this.
func (*Site) Site ¶
func (s *Site) Site() interface{}
Site is in the pages.RenderingContext interface.
func (*Site) TemplateEngine ¶
TemplateEngine is part of the plugins.Site interface.
func (*Site) ToLiquid ¶
func (s *Site) ToLiquid() interface{}
ToLiquid returns the site variable for template evaluation.
func (*Site) WriteDocument ¶
WriteDocument writes the document to a writer.
func (*Site) WritePages ¶
func (s *Site) WritePages(options BuildOptions) (count int, err error)
WritePages writes output files. It attends to options.dry_run.