Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidLayoutType = errors.New("layout must be a string")
ErrInvalidLayoutType is returned when the layout metadata is not a string
View Source
var (
LayoutFile = "layout.md"
)
Functions ¶
Types ¶
type ErrLayoutNotFound ¶
ErrLayoutNotFound is returned when a specified layout cannot be found in the registry
func (ErrLayoutNotFound) Error ¶
func (e ErrLayoutNotFound) Error() string
type ErrMissingLayout ¶
type ErrMissingLayout struct {
AvailableLayouts []string
}
ErrMissingLayout is returned when no layout is specified in the metadata
func (ErrMissingLayout) Error ¶
func (e ErrMissingLayout) Error() string
type MarkdownLoader ¶
type MarkdownLoader struct {
// contains filtered or unexported fields
}
func NewLoader ¶
func NewLoader(fsys fs.FS) *MarkdownLoader
type Page ¶
type Page interface { templ.Component // Name returns the name of the page. Ex.: "introduction" Name() string // Path returns the relative path of the page. // Ex.: "docs/introduction.md" Path() string // URL returns the page url mapped from the filesystem. // Ex.: "docs/introduction.md" -> "/docs/introduction" // Ex.: "docs/index.md" -> "/docs" URL() string // Meta returns the metadata of the page. // --- // Title: goldmark-meta // Summary: Add YAML metadata to the document // --- // tuns into // map[string]any{ // "Title": "goldmark-meta", // "Summary": "Add YAML metadata to the document", // } Meta() map[string]any }
Click to show internal directories.
Click to hide internal directories.