render

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Render html according to html templates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RenderData

type RenderData struct {
	Body                                     template.HTML
	Head                                     template.HTML
	WikiTitle                                string
	Url                                      string
	Title                                    string
	Description                              string
	Layout                                   string
	RootCrumb                                string
	Filename                                 string
	Date                                     string
	DateUpdated                              string
	MachineDate                              string
	MachineDateUpdated                       string
	Ext                                      string
	OutFilename                              string
	Tags                                     []string
	TagsListing                              []tag.Tag
	Footer                                   []config.FooterLink
	Backlinks, Relatedlinks, Crumbs, Listing []listing.Listing
	TOC                                      bool
	ShowHeader                               bool
}

All fields used in the html templates.

* Title: page title (set in title tags and in document)

* Description: body description

* Filename: has no extension. Used for navigation crumb.

func (*RenderData) Render added in v0.1.1

func (rd *RenderData) Render(t *template.Template, dryRun bool, templateName string) error

Template html with data d.

type RenderDeps added in v1.1.4

type RenderDeps struct {
	Config    *config.Config
	Templates *template.Template
	Entries   map[string]entry.Entry
	Skip      map[string]bool
	Listings  map[string][]listing.Listing
	InDir     string
	OutDir    string
	Files     []string
	Tags      []tag.Tag
	Metadata  parse.Metadata
	DryRun    bool
}

func (*RenderDeps) RenderAll added in v1.1.4

func (d *RenderDeps) RenderAll() error

Render all files, including tags page, to html.

Jump to

Keyboard shortcuts

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