publicsite

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package publicsite renders published posts as the built-in public site.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) http.Handler

New returns the handler serving the built-in public site.

Types

type Config

type Config struct {
	// Posts reads the published content the site shows.
	Posts Reader
	// Title names the site in its chrome.
	Title string
	// Version is the application version the pages report.
	Version string
}

Config carries what the site renders with.

type Reader

type Reader interface {
	List(ctx context.Context, f post.Filter) ([]post.Post, int, error)
	PublishedBySlug(ctx context.Context, postType, slug string) (post.Post, error)
}

Reader reads the published posts the site serves.

type Shell

type Shell struct {
	SiteTitle string
	Title     string
	Generator string
}

Shell is the chrome every page carries.

Jump to

Keyboard shortcuts

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