Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MonobrutalistChromaStyle = styles.Register(chroma.MustNewStyle("monobrutalist", chroma.StyleEntries{ chroma.Text: "#fafafa", chroma.Error: "#ef4444", chroma.Comment: "#525252", chroma.CommentPreproc: "#a1a1aa", chroma.Keyword: "#22c55e", chroma.KeywordReserved: "#22c55e", chroma.KeywordNamespace: "#22c55e", chroma.KeywordType: "#22c55e", chroma.Operator: "#fafafa", chroma.Punctuation: "#a1a1aa", chroma.Name: "#fafafa", chroma.NameBuiltin: "#22c55e", chroma.NameTag: "#22c55e", chroma.NameAttribute: "#a1a1aa", chroma.NameClass: "#22c55e", chroma.NameConstant: "#22c55e", chroma.NameDecorator: "#22c55e", chroma.NameException: "#ef4444", chroma.NameFunction: "#22c55e", chroma.NameProperty: "#a1a1aa", chroma.NameLabel: "#22c55e", chroma.NameNamespace: "#fafafa", chroma.NameOther: "#fafafa", chroma.NameVariable: "#fafafa", chroma.NameVariableMagic: "#22c55e", chroma.Literal: "#fafafa", chroma.LiteralDate: "#a1a1aa", chroma.LiteralString: "#a3e635", chroma.LiteralStringAffix: "#22c55e", chroma.LiteralStringEscape: "#22c55e", chroma.LiteralStringRegex: "#a3e635", chroma.LiteralNumber: "#f97316", chroma.LiteralNumberBin: "#f97316", chroma.LiteralNumberFloat: "#f97316", chroma.LiteralNumberHex: "#f97316", chroma.LiteralNumberInteger: "#f97316", chroma.LiteralNumberOct: "#f97316", chroma.Generic: "#fafafa", chroma.GenericDeleted: "#ef4444", chroma.GenericEmph: "italic", chroma.GenericError: "#ef4444", chroma.GenericHeading: "#fafafa bold", chroma.GenericInserted: "#22c55e", chroma.GenericOutput: "#a1a1aa", chroma.GenericPrompt: "#525252", chroma.GenericStrong: "bold", chroma.GenericSubheading: "#fafafa bold", chroma.GenericTraceback: "#ef4444", chroma.Background: "#1f1f1f", }))
MonobrutalistChromaStyle is a custom Chroma theme matching the Monobrutalist design system.
Functions ¶
This section is empty.
Types ¶
type BreadcrumbItem ¶
BreadcrumbItem represents a single breadcrumb entry.
type DocPageData ¶
type DocPageData struct {
Title string
Path string
Breadcrumbs []BreadcrumbItem
Content string
TOC []TOCItem
}
DocPageData holds the data for the document template.
type ErrorPageData ¶
ErrorPageData holds data for error templates.
type IndexPageData ¶
type IndexPageData struct {
Groups []PackageGroup
}
IndexPageData holds data for the index template.
type MarkdownRenderer ¶
type MarkdownRenderer struct {
// contains filtered or unexported fields
}
MarkdownRenderer handles markdown to HTML conversion with syntax highlighting.
func NewMarkdownRenderer ¶
func NewMarkdownRenderer() *MarkdownRenderer
NewMarkdownRenderer creates a new markdown renderer with all extensions enabled.
func (*MarkdownRenderer) Render ¶
func (r *MarkdownRenderer) Render(source []byte) (string, error)
Render converts markdown content to HTML with syntax highlighting.
func (*MarkdownRenderer) RenderWithTOC ¶
func (r *MarkdownRenderer) RenderWithTOC(source []byte) (html string, toc []TOCItem, err error)
RenderWithTOC converts markdown to HTML and extracts table of contents.
type PackageGroup ¶
type PackageGroup struct {
Language string
Packages []db.PackageInfo
}
PackageGroup represents a group of packages by language.
type SearchErrorResponse ¶
SearchErrorResponse represents an API error response.
func NewSearchErrorResponse ¶
func NewSearchErrorResponse(e string, c string) SearchErrorResponse
type SearchPageData ¶
type SearchPageData struct {
Query string
Results []SearchResultItem
Total int
Package string
}
SearchPageData holds data for the search template.
type SearchResponse ¶
type SearchResponse struct {
Query string `json:"query"`
Total int `json:"total"`
Results []SearchResultItem `json:"results"`
}
SearchResponse represents the API search response.
type SearchResultItem ¶
type SearchResultItem struct {
Path string `json:"path"`
Title string `json:"title"`
Snippet string `json:"snippet"`
Score float64 `json:"score"`
Package string `json:"package"`
}
SearchResultItem represents a single search result for API responses.