core

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplateFS embed.FS

Functions

This section is empty.

Types

type AtWhy

type AtWhy struct {
	Loader         Loader
	Finder         loader.TagFinder
	TagFactories   []tag.Factory
	Generator      Generator
	TemplateLoader TemplateLoader
	// contains filtered or unexported fields
}

AtWhy combines all parts of the application. @WHY LINK atwhy_struct_link @WHY CODE atwhy_struct_code

func New

func New(gen Generator, projectPath string, projectPathPrefix string, templateFolder string, extensions []string, commentConfig map[string]finder.CommentConfig) (AtWhy, error)

func (*AtWhy) Generate added in v0.5.0

func (a *AtWhy) Generate(template mdTemplate.Markdown, writer io.Writer) error

func (*AtWhy) ListenAndServe added in v0.5.0

func (a *AtWhy) ListenAndServe(host string) error

func (*AtWhy) Load added in v0.5.0

func (a *AtWhy) Load() ([]mdTemplate.Markdown, error)

type Generator

type Generator interface {
	Generate(markdownTemplate mdTemplate.Markdown, writer io.Writer) error

	// Ext returns the file extension which should be used for the generated files.
	Ext() string
}

type Loader

type Loader interface {
	Load(finder loader.TagFinder) (allTags []tag.Raw, err error)
}

type Page added in v0.5.0

type Page = mdTemplate.Markdown

Page currently just consists of a markdown template. So all information included can be used in the html template.

type TagProcessor

type TagProcessor interface {
	Process(tags []tag.Raw) ([]tag.Tag, error)
}

type TemplateLoader added in v0.5.0

type TemplateLoader interface {
	Load(tags []tag.Tag) ([]mdTemplate.Markdown, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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