urlset

package
v1.11.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package urlset handles creation of XML formatted URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML3Path

func HTML3Path() [7]string

func Lastmod

func Lastmod(s os.FileInfo) string

func Paths

func Paths() [28]string

Types

type Set

type Set struct {
	XMLName xml.Name `xml:"urlset,omitempty"`
	XMLNS   string   `xml:"xmlns,attr,omitempty"`
	URLs    []Tag    `xml:"url,omitempty"`
}

Set is a sitemap XML template.

func (*Set) StaticURLs

func (set *Set) StaticURLs(dir string) (int, int)

type Tag

type Tag struct {
	Location string `xml:"loc,omitempty"`
	// optional attributes
	LastModified string `xml:"lastmod,omitempty"`
	ChangeFreq   string `xml:"changefreq,omitempty"`
	Priority     string `xml:"priority,omitempty"`
}

Tag composes the <url> tag in the sitemap.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL