markdown

package
v0.0.0-...-e256ce7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Frontmatter

func Frontmatter(in []byte) (start, end int)

Frontmatter returns the start and end index of the frontmatter or -1,-1 if not available

Types

type Config

type Config struct {
	SearchPaths []string
	OutDir      string
}

func (*Config) Collect

func (c *Config) Collect() ([]Project, error)

type Page

type Page struct {
	Markdown string
	Html     string
	Plain    string
	HtmlFile string
	SrcFile  string
	Config   *PageConfig
}

type PageConfig

type PageConfig struct {
	// Alternate title for the page
	Title string `yaml:"title"`

	// Menu is slash separated, like my/cool/menu
	Menu string `yaml:"menu"`

	// ManagedBy names someone who is in charge of the page
	ManagedBy string `yaml:"managedBy"`

	// whatever that means
	Date time.Time `yaml:"date"`

	// Tags for an alternate hierarchyless navigation
	Tags []string `yaml:"tags"`
}

type Project

type Project struct {
	Name        string
	Path        string
	Markdown    []string
	Attachments []string
}

type TransformedProject

type TransformedProject struct {
	Project Project
	Pages   []Page
}

func Transform

func Transform(cfg Config) ([]TransformedProject, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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