source

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package source handles 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

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)

ExtractLinks walks through all files to collect links within the document.

func (*Source) ExtractMetadata

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

ExtractMetadata parses metadata (frontmatter) from source.

func (*Source) ToHTML

func (s *Source) ToHTML() (*Rendered, error)

ToHTML reads in soure code 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