Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeFreq ¶
type ChangeFreq string
const ( Always ChangeFreq = "always" Hourly ChangeFreq = "hourly" Daily ChangeFreq = "daily" Weekly ChangeFreq = "weekly" Monthly ChangeFreq = "monthly" Yearly ChangeFreq = "yearly" Never ChangeFreq = "never" )
type SitemapGenerator ¶
type SitemapGenerator struct { // configurations OutputDirectory string // Where to hold sitemaps LinksPerFile int // maximum items per file, 5000 for google // contains filtered or unexported fields }
func (*SitemapGenerator) Add ¶
func (s *SitemapGenerator) Add(sitemapURL *SitemapURL) error
func (*SitemapGenerator) Close ¶
func (s *SitemapGenerator) Close() error
func (*SitemapGenerator) WriteIndex ¶
func (s *SitemapGenerator) WriteIndex(baseURL string) (string, error)
type SitemapImage ¶
type SitemapImage struct {
Loc string `xml:"image:loc"`
}
type SitemapLoc ¶
type SitemapLoc struct { XMLName xml.Name `xml:"sitemap"` Loc string `xml:"loc"` LastMod commons.NullableTime `xml:"lastmod"` }
type SitemapParser ¶
type SitemapParser struct { RequestHeaders map[string]string AcceptSitemap func(url *SitemapLoc) bool OnURLFound func(url *SitemapURL) OnParseError func(error) }
func (*SitemapParser) Headers ¶ added in v0.5.35
func (p *SitemapParser) Headers() map[string]string
func (*SitemapParser) LoadRobots ¶
func (p *SitemapParser) LoadRobots(robotsURL string) error
func (*SitemapParser) LoadURL ¶
func (p *SitemapParser) LoadURL(sitemapURL string) error
type SitemapURL ¶
type SitemapURL struct { XMLName xml.Name `xml:"url"` Loc string `xml:"loc"` LastMod commons.NullableTime `xml:"lastmod"` ChangeFreq ChangeFreq `xml:"changefreq"` Priority float64 `xml:"priority"` Images []*SitemapImage `xml:"image:image"` }
Click to show internal directories.
Click to hide internal directories.