webstyle

package module
v0.0.0-...-58f761e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 12 Imported by: 4

README

Webstyle

Go Reference License

Assets and mardown rendering for consistent styling across my projects

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TemplateFull    = template.Must(templateBase.New("").Parse(layoutTpl))
	TemplateCompact = template.Must(templateCompact.New("").Parse(layoutTpl))
)

Functions

This section is empty.

Types

type Data added in v0.5.0

type Data struct {
	Main string

	// Optional
	Style    string
	Title    string // defaults to h1
	Subtitle string // defaults to h2
	Desc     string // defaults to subtitle
	Head     string
	GTM      string
	URL      string
}

Data does something

type Renderer added in v0.5.0

type Renderer struct {
	Markdown goldmark.Markdown
	Template *template.Template
}

func NewRenderer added in v0.5.0

func NewRenderer(t *template.Template) Renderer

func (Renderer) Render added in v0.5.0

func (r Renderer) Render(w io.Writer, src io.Reader, d Data) error

func (Renderer) RenderBytes added in v0.5.0

func (r Renderer) RenderBytes(src []byte, d Data) ([]byte, error)

Directories

Path Synopsis
picture is a goldmark extension to render images as html picture blocks instead of img tags in a paragraph
picture is a goldmark extension to render images as html picture blocks instead of img tags in a paragraph
webstatic is an filesystem for common static files needed across html pages.
webstatic is an filesystem for common static files needed across html pages.

Jump to

Keyboard shortcuts

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