Documentation
¶
Index ¶
- Constants
- func Getwd() (string, error)
- func NewBindingNode(p *hype.Parser, el *hype.Element, whole *binding.Whole) (hype.Node, error)
- func NewBindingNodes(whole *binding.Whole) hype.ParseElementFn
- func NewParser(cab fs.FS, ctxPath string, pwd string) (*hype.Parser, error)
- func WithTimeout(ctx context.Context, timeout time.Duration, f func(context.Context) error) error
- func WithinDir(dir string, f func() error) error
- type App
- type Binding
- type Blog
- type Commander
- type Encode
- type Env
- type Export
- func (cmd *Export) Flags(stderr io.Writer) (*flag.FlagSet, error)
- func (cmd *Export) Main(ctx context.Context, pwd string, args []string) error
- func (cmd *Export) ScopedPlugins() plugins.Plugins
- func (cmd *Export) SetParser(p *hype.Parser) error
- func (cmd *Export) WithPlugins(fn plugins.FeederFn) error
- type Marked
- type OutPath
- type ParserCommander
- type Part
- type Preview
- func (cmd *Preview) Flags(stderr io.Writer) (*flag.FlagSet, error)
- func (cmd *Preview) Main(ctx context.Context, pwd string, args []string) error
- func (cmd *Preview) ScopedPlugins() plugins.Plugins
- func (cmd *Preview) SetParser(p *hype.Parser) error
- func (cmd *Preview) WithPlugins(fn plugins.FeederFn) error
- type Slides
- type TOC
- type VSCode
- type Validate
- type Version
- type VersionInfo
Constants ¶
View Source
const (
DefaultTimeout = time.Second * 30
)
Variables ¶
This section is empty.
Functions ¶
func NewBindingNode ¶
func NewBindingNodes ¶
func NewBindingNodes(whole *binding.Whole) hype.ParseElementFn
func WithTimeout ¶
Types ¶
type Blog ¶ added in v0.5.0
type Blog struct {
cleo.Cmd
Timeout time.Duration
Verbose bool
Info VersionInfo
// contains filtered or unexported fields
}
type Encode ¶
type Export ¶
type Export struct {
cleo.Cmd
// a folder containing all chapters of a book, for example
File string // optional file name to preview
OutPath OutPath // path to a file to write the output on success; default: nil
Timeout time.Duration // default: 30s
Parser *hype.Parser // If nil, a default parser is used.
Verbose bool // default: false
Format string // default:markdown
Theme string // theme name for HTML export; default: "github"
CustomCSS string // path to custom CSS file
NoCSS bool // output raw HTML without styling
ListThemes bool // list available themes and exit
CheckLinks bool // enable link reachability checking
LinkTimeout time.Duration // per-link check timeout
LinkExclude string // comma-separated URL patterns to exclude
LinkRate float64 // requests per second per host
// contains filtered or unexported fields
}
func (*Export) ScopedPlugins ¶
type Marked ¶
type Marked struct {
cleo.Cmd
// a folder containing all chapters of a book, for example
ContextPath string
File string // optional file name to preview
Timeout time.Duration // default: 5s
Parser *hype.Parser // If nil, a default parser is used.
ParseOnly bool // if true, only parse the file and exit
Section int // default: 1
Verbose bool // default: false
// contains filtered or unexported fields
}
func (*Marked) ScopedPlugins ¶
type ParserCommander ¶
type Preview ¶ added in v0.6.0
type Preview struct {
cleo.Cmd
File string
Port int
WatchDirs stringSlice
Extensions string
IncludeGlobs stringSlice
ExcludeGlobs stringSlice
DebounceDelay time.Duration
Verbose bool
OpenBrowser bool
Theme string
CustomCSS string
ListThemes bool
Timeout time.Duration
Info VersionInfo
Parser *hype.Parser
// contains filtered or unexported fields
}
func (*Preview) ScopedPlugins ¶ added in v0.6.0
type Slides ¶
type Slides struct {
cleo.Cmd
// Env to be used by the app
// If nil, os.Getenv will be used.
*Env
// Web app to be used by the app
slides.App
Parser *hype.Parser
// Server to be used by the app
// If nil, a default server will be created.
Server *http.Server
// Port to listen on. Defaults to 3000.
Port int
// contains filtered or unexported fields
}
type VSCode ¶
type Validate ¶ added in v0.8.0
type Validate struct {
cleo.Cmd
File string
Timeout time.Duration
Parser *hype.Parser
Verbose bool
Exec bool
Format string
// contains filtered or unexported fields
}
type Version ¶ added in v0.6.0
type Version struct {
cleo.Cmd
Info VersionInfo
}
type VersionInfo ¶ added in v0.6.0
func (VersionInfo) String ¶ added in v0.6.0
func (v VersionInfo) String() string
Click to show internal directories.
Click to hide internal directories.