Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { Robots(ctx *gin.Context) SiteMapIndex(ctx *gin.Context) SiteMapResource(ctx *gin.Context) SiteMapXSL(ctx *gin.Context, index bool) }
Handler defines methods for seo routes to interact with the server.
type SEO ¶
SEO defines the handler for all seo routes, such as sitemaps and robots.txt
func (*SEO) Robots ¶
Robots
Obtains the Seo Robots field from the options struct which is set in the settings, and returns the robots.txt file.
Returns a http.StatusNotFound if the options don't allow serving of robots.txt
func (*SEO) SiteMapIndex ¶
SiteMapIndex obtains the sitemap index file from the sitemap model Obtains the []bytes to send back as data when /sitemap.xml is visited.
Returns a http.StatusNotFound if there was an error obtaining the XML file. or there was no resource items found.
func (*SEO) SiteMapResource ¶
SiteMapResource
Obtains the sitemap pages from the sitemap model by using the resource in the url. Obtains the []bytes to send back as data when /:resource/sitemap.xml is visited.
Returns a http.StatusNotFound if there was an error obtaining the XML file or there was no resource items found.