Documentation
¶
Index ¶
- func AbsoluteURL(base *url.URL, route string) string
- func Handler(options HandlerOptions, provider Provider) http.Handler
- func NormalizeURL(base *url.URL, loc string) (string, error)
- func ParseBaseURL(value string) (*url.URL, error)
- func Sitemap(baseURL string, urls []URL) ([]byte, error)
- type HandlerOptions
- type Provider
- type URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsoluteURL ¶
AbsoluteURL joins a root-relative route under the configured base URL.
func Handler ¶
func Handler(options HandlerOptions, provider Provider) http.Handler
Handler returns an HTTP handler that merges generated static URLs with an optional app-owned provider. Provider errors return a generic unavailable response and do not expose application error text.
func NormalizeURL ¶
NormalizeURL validates one sitemap URL and returns its absolute form.
func ParseBaseURL ¶
ParseBaseURL validates the configured site base URL.
Types ¶
type HandlerOptions ¶
HandlerOptions configures a generated sitemap handler.
Click to show internal directories.
Click to hide internal directories.