markdown

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: BSD-2-Clause Imports: 13 Imported by: 1

Documentation

Overview

Package markdown are a set of common markdownparser utils used in pllaces like sevki.org/troff

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name        string
	Affiliation string
	Email       string
	Twitter     string
	Github      string
}

Author information

type Post

type Post struct {
	Title    string
	Date     Time
	Slug     string
	Authors  []Author
	Abstract string
	Tags     []string
}

Post holds info about the post

type Renderer

type Renderer interface {
	blackfriday.Renderer
	Post() *Post
}

Renderer wraps the blackfriday.Renderer interface

func NewRenderer

func NewRenderer(r blackfriday.Renderer) Renderer

NewRenderer takes a blackfriday.Renderer and returns a Renderer

type Time

type Time struct {
	time.Time
}

Time is markdown post block time format

func (*Time) UnmarshalText

func (t *Time) UnmarshalText(text []byte) error

UnmarshalText satisfies textunmarshaller

Notes

Bugs

  • we get things that are not title blocks here

Jump to

Keyboard shortcuts

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