generator

package
v0.0.0-...-fc6af5e Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRootStyle

func GenerateRootStyle(outputDir string) error

Types

type GenerationResult

type GenerationResult struct {
	DocsCount     int
	ImagesCount   int
	SiteStructure string
}

GenerationResult contains information about the generated site

type Generator

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

Generator handles the site generation

func NewGenerator

func NewGenerator(repoData *git.RepositoryData, outputDir string) *Generator

NewGenerator creates a new site generator

func (*Generator) GenerateSite

func (g *Generator) GenerateSite() (*GenerationResult, error)

GenerateSite generates the complete static site

type PageData

type PageData struct {
	RepoOwner    string
	RepoName     string
	RepoFullName string
	Description  string
	CommitCount  int
	LastUpdate   string
	License      string
	RepoURL      string

	ReadmeHTML   string
	Contributors []git.Contributor

	// Navigation
	DocsPages []utils.DocPage

	// Current page info
	CurrentPage string
	PageTitle   string
	PageContent string

	// Generation info
	GeneratedAt string
}

PageData contains the data passed to HTML templates

Jump to

Keyboard shortcuts

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