Versions in this module Expand all Collapse all v0 v0.18.1 Dec 29, 2016 Changes in this version + const KindHome + const KindPage + const KindSection + const KindTaxonomy + const KindTaxonomyTerm + var BuildDate string + var CommitHash string + var ErrHasDraftAndPublished = errors.New("both draft and published parameters were found in page's frontmatter") + func HandleShortcodes(stringToParse string, page *Page, t tpl.Template) (string, error) + func HandlerMatch(h Handler, ext string) bool + func LoadGlobalConfig(relativeSourcePath, configFilename string) error + func RegisterHandler(h Handler) + type Author struct + DisplayName string + Email string + FamilyName string + GivenName string + Image string + LongBio string + ShortBio string + Social AuthorSocial + Thumbnail string + type AuthorList map[string]Author + type AuthorSocial map[string]string + type BuildCfg struct + CreateSitesFromConfig bool + PrintStats bool + ResetState bool + SkipRender bool + Watching bool + type Handle struct + func (h Handle) Extensions() []string + type HandleResults chan<- HandledResult + type HandledResult struct + func (h HandledResult) Error() string + func (h HandledResult) Page() *Page + func (h HandledResult) String() string + type Handler interface + Extensions func() []string + FileConvert func(*source.File, *Site) HandledResult + PageConvert func(*Page, tpl.Template) HandledResult + Read func(*source.File, *Site) HandledResult + func FindHandler(ext string) Handler + func Handlers() []Handler + type HugoInfo struct + BuildDate string + CommitHash string + Generator template.HTML + Version string + type HugoSites struct + Sites []*Site + func NewHugoSitesFromConfiguration() (*HugoSites, error) + func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error + func (h *HugoSites) Pages() Pages + type Image struct + AltText string + Caption string + GeoLocation string + License string + Title string + URL string + type Menu []*MenuEntry + func (m Menu) ByName() Menu + func (m Menu) ByWeight() Menu + func (m Menu) Limit(n int) Menu + func (m Menu) Reverse() Menu + func (m Menu) Sort() Menu + type MenuEntry struct + Children Menu + Identifier string + Menu string + Name string + Parent string + Post template.HTML + Pre template.HTML + URL string + Weight int + func (m *MenuEntry) HasChildren() bool + func (m *MenuEntry) IsEqual(inme *MenuEntry) bool + func (m *MenuEntry) IsSameResource(inme *MenuEntry) bool + func (m *MenuEntry) KeyName() string + type Menus map[string]*Menu + type MetaHandle struct + func NewMetaHandler(in string) *MetaHandle + func (mh *MetaHandle) Convert(i interface{}, s *Site, results HandleResults) + func (mh *MetaHandle) Handler() Handler + func (mh *MetaHandle) Read(f *source.File, s *Site, results HandleResults) + type MetaHandler interface + Convert func(interface{}, *Site, HandleResults) + Handle func() Handler + Read func(*source.File, *Site, HandleResults) + type Multilingual struct + DefaultLang *helpers.Language + Languages helpers.Languages + func (ml *Multilingual) Language(lang string) *helpers.Language + type OrderedTaxonomy []OrderedTaxonomyEntry + func (t OrderedTaxonomy) Reverse() OrderedTaxonomy + type OrderedTaxonomyEntry struct + Name string + WeightedPages WeightedPages + func (ie OrderedTaxonomyEntry) Count() int + func (ie OrderedTaxonomyEntry) Pages() Pages + func (ie OrderedTaxonomyEntry) Term() string + type Page struct + Aliases []string + Content template.HTML + Data map[string]interface{} + Date time.Time + Description string + Draft bool + ExpiryDate time.Time + GitInfo *gitmap.GitInfo + Images []Image + Keywords []string + Kind string + Lastmod time.Time + Layout string + Markup string + Pages Pages + Params map[string]interface{} + PublishDate time.Time + RSSLink template.HTML + Site *SiteInfo + Sitemap Sitemap + Status string + Summary template.HTML + TableOfContents template.HTML + Title string + Truncated bool + Videos []Video + func NewPage(name string) (*Page, error) + func NewPageFrom(buf io.Reader, name string) (*Page, error) + func (n *Page) Paginate(seq interface{}, options ...interface{}) (*Pager, error) + func (p *Page) AllTranslations() Pages + func (p *Page) Author() Author + func (p *Page) Authors() AuthorList + func (p *Page) Extension() string + func (p *Page) FullFilePath() string + func (p *Page) FuzzyWordCount() int + func (p *Page) GetParam(key string) interface{} + func (p *Page) HasMenuCurrent(menuID string, me *MenuEntry) bool + func (p *Page) Hugo() *HugoInfo + func (p *Page) IsDraft() bool + func (p *Page) IsExpired() bool + func (p *Page) IsFuture() bool + func (p *Page) IsHome() bool + func (p *Page) IsMenuCurrent(menuID string, inme *MenuEntry) bool + func (p *Page) IsNode() bool + func (p *Page) IsPage() bool + func (p *Page) IsRenderable() bool + func (p *Page) IsTranslated() bool + func (p *Page) Lang() string + func (p *Page) Language() *helpers.Language + func (p *Page) LanguagePrefix() string + func (p *Page) LinkTitle() string + func (p *Page) Menus() PageMenus + func (p *Page) Now() time.Time + func (p *Page) Paginator(options ...interface{}) (*Pager, error) + func (p *Page) Param(key interface{}) (interface{}, error) + func (p *Page) Permalink() string + func (p *Page) Plain() string + func (p *Page) PlainWords() []string + func (p *Page) ProcessShortcodes(t tpl.Template) + func (p *Page) RSSlink() template.HTML + func (p *Page) RawContent() string + func (p *Page) ReadFrom(buf io.Reader) (int64, error) + func (p *Page) ReadingTime() int + func (p *Page) Ref(ref string) (string, error) + func (p *Page) RelPermalink() string + func (p *Page) RelRef(ref string) (string, error) + func (p *Page) Render(layout ...string) template.HTML + func (p *Page) SafeSaveSourceAs(path string) error + func (p *Page) SaveSource() error + func (p *Page) SaveSourceAs(path string) error + func (p *Page) Scratch() *Scratch + func (p *Page) Section() string + func (p *Page) SetSourceContent(content []byte) + func (p *Page) SetSourceMetaData(in interface{}, mark rune) (err error) + func (p *Page) String() string + func (p *Page) TargetPath() (outfile string) + func (p *Page) Translations() Pages + func (p *Page) Type() string + func (p *Page) URL() string + func (p *Page) UniqueID() string + func (p *Page) WordCount() int + type PageCollections struct + AllPages Pages + AllRegularPages Pages + Pages Pages + RegularPages Pages + type PageGroup struct + Key interface{} + Pages Pages + type PageMenus map[string]*MenuEntry + type PageMeta struct + Weight int + func (*PageMeta) FuzzyWordCount() int + func (*PageMeta) ReadingTime() int + func (*PageMeta) WordCount() int + type Pager struct + func (p *Pager) First() *Pager + func (p *Pager) HasNext() bool + func (p *Pager) HasPrev() bool + func (p *Pager) Last() *Pager + func (p *Pager) Next() *Pager + func (p *Pager) NumberOfElements() int + func (p *Pager) PageGroups() PagesGroup + func (p *Pager) PageNumber() int + func (p *Pager) Pages() Pages + func (p *Pager) Prev() *Pager + func (p *Pager) URL() template.HTML + func (p Pager) PageSize() int + func (p Pager) Pagers() pagers + func (p Pager) String() string + func (p Pager) TotalNumberOfElements() int + func (p Pager) TotalPages() int + type Pages []*Page + func (p Pages) ByDate() Pages + func (p Pages) ByExpiryDate() Pages + func (p Pages) ByLanguage() Pages + func (p Pages) ByLastmod() Pages + func (p Pages) ByLength() Pages + func (p Pages) ByLinkTitle() Pages + func (p Pages) ByPublishDate() Pages + func (p Pages) ByTitle() Pages + func (p Pages) ByWeight() Pages + func (p Pages) GroupBy(key string, order ...string) (PagesGroup, error) + func (p Pages) GroupByDate(format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByExpiryDate(format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByParam(key string, order ...string) (PagesGroup, error) + func (p Pages) GroupByParamDate(key string, format string, order ...string) (PagesGroup, error) + func (p Pages) GroupByPublishDate(format string, order ...string) (PagesGroup, error) + func (p Pages) Len() int + func (p Pages) Limit(n int) Pages + func (p Pages) Next(cur *Page) *Page + func (p Pages) Prev(cur *Page) *Page + func (p Pages) Reverse() Pages + func (p Pages) Sort() + func (p Pages) String() string + func (ps Pages) FindPagePos(page *Page) int + func (ps Pages) FindPagePosByFilePath(inPath string) int + type PagesGroup []PageGroup + func (p PagesGroup) Reverse() PagesGroup + func (psg PagesGroup) Len() int + type PermalinkOverrides map[string]pathPattern + type Position struct + Next *Page + NextInSection *Page + Prev *Page + PrevInSection *Page + type Scratch struct + func (c *Scratch) Add(key string, newAddend interface{}) (string, error) + func (c *Scratch) Get(key string) interface{} + func (c *Scratch) GetSortedMapValues(key string) interface{} + func (c *Scratch) Set(key string, value interface{}) string + func (c *Scratch) SetInMap(key string, mapKey string, value interface{}) string + type ShortcodeWithPage struct + Inner template.HTML + IsNamedParams bool + Page *Page + Params interface{} + Parent *ShortcodeWithPage + func (scp *ShortcodeWithPage) Get(key interface{}) interface{} + func (scp *ShortcodeWithPage) Ref(ref string) (string, error) + func (scp *ShortcodeWithPage) RelRef(ref string) (string, error) + func (scp *ShortcodeWithPage) Scratch() *Scratch + func (scp *ShortcodeWithPage) Site() *SiteInfo + type Site struct + Data map[string]interface{} + Files []*source.File + Info SiteInfo + Language *helpers.Language + Menus Menus + Sections Taxonomy + Source source.Input + Taxonomies TaxonomyList + func (s *Site) Initialise() (err error) + func (s *Site) Stats() + type SiteInfo struct + Author map[string]interface{} + Authors AuthorList + BaseURL template.URL + BuildDrafts bool + Copyright string + Data *map[string]interface{} + DisqusShortname string + Files *[]*source.File + GoogleAnalytics string + Hugo *HugoInfo + Language *helpers.Language + LanguageCode string + LanguagePrefix string + Languages helpers.Languages + LastChange time.Time + Menus *Menus + Params map[string]interface{} + Permalinks PermalinkOverrides + RSSLink string + Sections Taxonomy + Social SiteSocial + Taxonomies TaxonomyList + Title string + func (s *SiteInfo) GetPage(typ string, path ...string) *Page + func (s *SiteInfo) GetParam(key string) interface{} + func (s *SiteInfo) HomeAbsURL() string + func (s *SiteInfo) IsMultiLingual() bool + func (s *SiteInfo) Param(key interface{}) (interface{}, error) + func (s *SiteInfo) Ref(ref string, page *Page) (string, error) + func (s *SiteInfo) RelRef(ref string, page *Page) (string, error) + func (s *SiteInfo) SitemapAbsURL() string + func (s *SiteInfo) SourceRelativeLink(ref string, currentPage *Page) (string, error) + func (s *SiteInfo) SourceRelativeLinkFile(ref string, currentPage *Page) (string, error) + func (s *SiteInfo) String() string + type SiteSocial map[string]string + type Sitemap struct + ChangeFreq string + Filename string + Priority float64 + type Source struct + Content []byte + Frontmatter []byte + type Taxonomy map[string]WeightedPages + func (i Taxonomy) Alphabetical() OrderedTaxonomy + func (i Taxonomy) ByCount() OrderedTaxonomy + func (i Taxonomy) Count(key string) int + func (i Taxonomy) Get(key string) WeightedPages + func (i Taxonomy) TaxonomyArray() OrderedTaxonomy + type TaxonomyList map[string]Taxonomy + func (tl TaxonomyList) String() string + type Translations map[string]*Page + type URLPath struct + Permalink string + Section string + Slug string + URL string + type Video struct + ContentLoc string + Description string + Duration string + ExpirationDate string + FamilyFriendly string + GalleryLoc string + Live string + PlayerLoc string + Price string + PublicationDate string + Rating string + RequiresSubscription string + Restriction string + ThumbnailLoc string + Title string + Uploader string + ViewCount string + type WeightedPage struct + Page *Page + Weight int + func (w WeightedPage) String() string + type WeightedPages []WeightedPage + func (wp WeightedPages) Count() int + func (wp WeightedPages) Len() int + func (wp WeightedPages) Less(i, j int) bool + func (wp WeightedPages) Next(cur *Page) *Page + func (wp WeightedPages) Pages() Pages + func (wp WeightedPages) Prev(cur *Page) *Page + func (wp WeightedPages) Sort() + func (wp WeightedPages) Swap(i, j int)