content

package module
v0.0.0-...-9e4d556 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Unlicense Imports: 28 Imported by: 0

README

Public content of seedhammer.com

Run local viewer

Command viewer runs a webserver at http://localhost:8080 with the content.

$ go run ./cmd/viewer

The Nix helper script runs the viewer and reloads it on file changes.

$ nix run .#

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("resource not found")
View Source
var Templates map[string]*template.Template

Functions

func CachingHandler

func CachingHandler(h http.Handler) http.Handler

func LoadTemplates

func LoadTemplates(dir fs.FS) (map[string]*template.Template, error)

func Register

func Register(mux *http.ServeMux)

func RenderPageTemplate

func RenderPageTemplate(w io.Writer, r *http.Request, tmpl *template.Template, args any) error

Types

type Article

type Article struct {
	Slug        string
	Title       string
	Author      string
	AuthorLink  string
	Description string
	Image       string
	Type        string
	Published   time.Time
	Content     template.HTML
}

type LoggingFunc

type LoggingFunc func(http.ResponseWriter, *http.Request) error

func (LoggingFunc) ServeHTTP

func (f LoggingFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Nav struct {
	Name   string
	URL    string
	Target string
}

type Section

type Section struct {
	ID   string
	Name string
}

type TOC

type TOC []struct {
	Slug     string
	Name     string
	Index    int
	Sections []Section
}

Directories

Path Synopsis
cmd
viewer command
doc

Jump to

Keyboard shortcuts

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