site

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles multi-page site discovery and navigation

func New

func New(rootDir string, cfg *config.Config) *Manager

New creates a new site manager

func (*Manager) AllPages

func (m *Manager) AllPages() []*PageNode

AllPages returns all pages (flat list)

func (*Manager) Discover

func (m *Manager) Discover() error

Discover scans the directory and builds the site structure

func (*Manager) GenerateSearchIndex

func (m *Manager) GenerateSearchIndex() []SearchEntry

GenerateSearchIndex creates a search index from all pages

func (*Manager) GetBreadcrumbs

func (m *Manager) GetBreadcrumbs(urlPath string) []*PageNode

GetBreadcrumbs returns the breadcrumb trail for a given path

func (*Manager) GetHome

func (m *Manager) GetHome() *PageNode

GetHome returns the home page

func (*Manager) GetNavigation

func (m *Manager) GetNavigation() []*PageNode

GetNavigation returns the navigation tree

func (*Manager) GetPage

func (m *Manager) GetPage(urlPath string) (*PageNode, bool)

GetPage returns a page by its URL path

func (*Manager) GetPrevNext

func (m *Manager) GetPrevNext(currentPath string) (prev, next *PageNode)

GetPrevNext returns the previous and next pages for navigation

func (*Manager) Reload

func (m *Manager) Reload(filePath string) error

Reload reloads a specific file (for hot reload)

type PageNode

type PageNode struct {
	Title    string           // Page title from frontmatter or config
	Path     string           // URL path (e.g., "/getting-started/installation")
	FilePath string           // Relative file path (e.g., "getting-started/installation.md")
	Page     *tinkerdown.Page // Parsed page content
	IsHome   bool             // Whether this is the home page
	Children []*PageNode      // Child pages (for sections)
}

PageNode represents a page in the site structure

type SearchEntry

type SearchEntry struct {
	Title   string `json:"title"`
	Path    string `json:"path"`
	Content string `json:"content"`
	Section string `json:"section,omitempty"`
}

SearchEntry represents a single entry in the search index

Jump to

Keyboard shortcuts

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