source

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Handle markdown source and helper methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Links struct {
	BackLinks     []string
	InternalLinks []string
}

type Source

type Source struct {
	Body             []byte
	RendersTOC       bool
	RendersHighlight bool
}
func (s *Source) ExtractLinks() (*Links, error)

Parse b to find all other links within the document.

func (*Source) ExtractMetadata

func (s *Source) ExtractMetadata() (*metadata.Metadata, error)

Parse metadata (frontmatter) from source b.

func (*Source) ToHTML

func (s *Source) ToHTML() ([]byte, error)

Read in b and parse body. Frontmatter is reprocessed to strip it.

Jump to

Keyboard shortcuts

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