fsmarkdown

package
v0.82.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

buyer beware

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailedPage

type DetailedPage struct {
	*Page
	Sitemap      Sitemap
	IndexSitemap Sitemap
	BackItem     string
}

type FrontmatterParser

type FrontmatterParser = func(io.Reader, any) ([]byte, error)

type Instance

type Instance struct {
	Options
	// contains filtered or unexported fields
}

Do not initialize manually. Always create with New().

func New

func New(opts Options) *Instance

func (*Instance) GetPageDetails

func (inst *Instance) GetPageDetails(r *http.Request) (detailedPage *DetailedPage, err error)

func (*Instance) GetPlainMarkdown

func (inst *Instance) GetPlainMarkdown(r *http.Request) (string, error)

type MarkdownParser

type MarkdownParser = func([]byte) []byte

type Options

type Options struct {
	FS                fs.FS
	FrontmatterParser FrontmatterParser
	MarkdownParser    MarkdownParser
	IsDev             bool
}

type Page

type Page struct {
	Title       string `yaml:"title"`
	Description string `yaml:"description"`
	Date        string `yaml:"date"`
	Order       int    `yaml:"order"`
	Content     template.HTML
	RawContent  string
	URL         string
	IsFolder    bool
}

type Sitemap

type Sitemap []SitemapItem

type SitemapItem

type SitemapItem struct {
	Title       string `json:"title"`
	URL         string `json:"url"`
	Description string `json:"description,omitempty"`
	Date        string `json:"date,omitempty"`
	IsFolder    bool   `json:"isFolder,omitempty"`
	IsActive    bool   `json:"isActive,omitempty"`
}

Jump to

Keyboard shortcuts

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