gemini

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package gemini contains an implementation of markdown => text/gemini renderer for github.com/gomarkdown/markdown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata interface {
	Title() string
	Date() time.Time
}

Metadata provides data necessary for proper post rendering.

type Renderer

type Renderer struct {
	Metadata Metadata
}

Renderer implements markdown.Renderer.

func NewRenderer

func NewRenderer() Renderer

NewRenderer returns a new Renderer.

func NewRendererWithMetadata

func NewRendererWithMetadata(m Metadata) Renderer

NewRendererWithMetadata returns a new Renderer initialized with post metadata.

func (Renderer) RenderFooter

func (r Renderer) RenderFooter(w io.Writer, node ast.Node)

RenderFooter implements Renderer.RenderFooter().

func (Renderer) RenderHeader

func (r Renderer) RenderHeader(w io.Writer, node ast.Node)

RenderHeader implements Renderer.RenderHeader(). It renders metadata at the top of the post if any has been provided.

func (Renderer) RenderNode

func (r Renderer) RenderNode(w io.Writer, node ast.Node, entering bool) ast.WalkStatus

RenderNode implements Renderer.RenderNode().

Jump to

Keyboard shortcuts

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