core

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryIsIgnored = errors.New("repository is ignored")
)

Functions

This section is empty.

Types

type Core

type Core struct {
	// Config used to instantiate this core.
	Config *config.Config

	StaticDir fs.FS

	ScanDir *os.Root

	Markdown  html.MarkdownRenderer
	Plaintext html.PlaintextRenderer
	// contains filtered or unexported fields
}

func New

func New(config *config.Config) (*Core, error)

func (*Core) RepositoryName

func (_ *Core) RepositoryName(path string) string

RepositoryName returns formatted display name of a repository.

func (*Core) RepositoryPath

func (core *Core) RepositoryPath(name string) (string, error)

RepositoryPath finds a repository by name and returns its filepath. name is not supposed to contain slash characters.

func (*Core) RobotsTxt

func (c *Core) RobotsTxt() io.Reader

func (*Core) Template

func (core *Core) Template() *template.Template

Template returns compiled HTML templates.

Jump to

Keyboard shortcuts

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