feed

package
v0.0.0-...-186a780 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package feed implements method to convert a Gemini feed to a gorilla/feeds parser object, which can later be used to generate RSS or Atom feeds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFeed

func GenerateFeed(g *parser.Gemtext, c *Config) (*feeds.Feed, error)

GenerateFeed processes a Gemtext AST and outputs a feed object.

The AST will be scanned for link objects which have a label, and where the first space-separated word of the label is a date of the format YYYY-MM-DD, and the remaining non-whitespace string is non-empty (treated as the title).

Types

type Config

type Config struct {

	// Title is the title of the RSS feed.
	Title string

	// Link is a link to the home page of the website.
	Link string

	// Description is a brief description of the RSS feed.
	Description string

	// AuthorName is the name of the author of the RSS feed.
	AuthorName string

	// AuthorEmail is the email of the author of the RSS feed.
	AuthorEmail string

	// RewriteSpecs is a list of link rewrite specifications to be applied
	// during HTML generation.
	RewriteSpecs []*util.RewriteSpec
}

Config represents the configuration flags for RSS generation.

Jump to

Keyboard shortcuts

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