md

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Tag feature.Tag = "pages-formats-md"

Variables

This section is empty.

Functions

func PreRenderMarkdown added in v0.5.8

func PreRenderMarkdown(content string) (parsedBytes []byte)

func RenderExcerpt added in v0.5.8

func RenderExcerpt(content string) (excerpt string)

func RenderMarkdown

func RenderMarkdown(content string) (text string)

Types

type CDocument

type CDocument struct {
	search.CDocument

	Links     []string `json:"links"`
	Headings  []string `json:"headings"`
	Footnotes []string `json:"footnotes"`
}

func NewMarkdownDocument

func NewMarkdownDocument(language, url, title string) (doc *CDocument)

func (*CDocument) AddFootnote

func (d *CDocument) AddFootnote(text string)

func (*CDocument) AddHeading

func (d *CDocument) AddHeading(text string)
func (d *CDocument) AddLink(text string)

func (*CDocument) Self

func (d *CDocument) Self() interface{}

type CFeature

type CFeature struct {
	feature.CFeature
	// contains filtered or unexported fields
}

func (*CFeature) AddSearchDocumentMapping

func (f *CFeature) AddSearchDocumentMapping(tag language.Tag, indexMapping *mapping.IndexMappingImpl)

func (*CFeature) Extensions

func (f *CFeature) Extensions() (extensions []string)

func (*CFeature) IndexDocument

func (f *CFeature) IndexDocument(pg feature.Page) (out interface{}, err error)

func (*CFeature) Init

func (f *CFeature) Init(this interface{})

func (*CFeature) Label

func (f *CFeature) Label() (label string)

func (*CFeature) Make

func (f *CFeature) Make() Feature

func (*CFeature) Name

func (f *CFeature) Name() (name string)

func (*CFeature) NewDocumentMapping

func (f *CFeature) NewDocumentMapping(tag language.Tag) (doctype, analyzer string, dm *mapping.DocumentMapping)

func (*CFeature) Prepare

func (f *CFeature) Prepare(ctx context.Context, content string) (out context.Context, err error)

func (*CFeature) Process

func (f *CFeature) Process(ctx context.Context, content string) (html template.HTML, redirect string, err error)

func (*CFeature) SearchDocumentMapping

func (f *CFeature) SearchDocumentMapping(tag language.Tag) (doctype string, dm *mapping.DocumentMapping)

func (*CFeature) SetMore added in v0.5.8

func (f *CFeature) SetMore(enabled bool) MakeFeature

type Document

type Document interface {
	search.Document
	AddLink(text string)
	AddHeading(text string)
	AddFootnote(text string)
}

type Feature

type Feature interface {
	feature.Feature
	feature.PageFormat
}

type MakeFeature

type MakeFeature interface {
	SetMore(enabled bool) MakeFeature

	Make() Feature
}

func New

func New() MakeFeature

func NewTagged added in v0.4.0

func NewTagged(tag feature.Tag) MakeFeature

Jump to

Keyboard shortcuts

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