rss

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package rss defines struct types, constants, and helper functions related to the site's RSS feed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	Description string `xml:"description"`
	Language    string `xml:"language"`
	Image       Image  `xml:"image"`
	Items       []Item `xml:"item"`
}

Channel is used for marshalling data into the blog's RSS feed.

type Description

type Description struct {
	Type string        `xml:"type,attr"`
	Text template.HTML `xml:",chardata"`
}

type Image

type Image struct {
	Title  string `xml:"title"`
	Link   string `xml:"link"`
	URL    string `xml:"url"`
	Width  int    `xml:"width"`
	Height int    `xml:"height"`
}

Image is used to display an image when aggregators present a field.

type Item

type Item struct {
	Title       string      `xml:"title"`
	Link        string      `xml:"link"`
	GUID        string      `xml:"guid"`
	PubDate     string      `xml:"pubDate"`
	Description Description `xml:"description"`
	// contains filtered or unexported fields
}

Item is used to enumerate a blog post's mention in the RSS feed.

func NewItem

func NewItem(title, link, guid string, text template.HTML, date time.Time) Item

func (Item) Date

func (item Item) Date() time.Time

type RSS

type RSS struct {
	XMLName xml.Name `xml:"rss"`
	Channel Channel  `xml:"channel"`
	Version string   `xml:"version,attr"`
}

Jump to

Keyboard shortcuts

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