source

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 17 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 Rendered added in v2.3.0

type Rendered struct {
	HTML      []byte
	ChromaCSS []byte
}

type Source

type Source struct {
	CodeTheme     string
	Body          []byte
	TOC           bool
	CodeHighlight 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() (*Rendered, 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