page

package
v0.0.0-...-3244a0f Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {

	// Page title, guessed from the current document. (Looks for the first H1, H2, ..., H6 tag)
	Title string

	// The HTML of the current document.
	Content template.HTML

	// The HTML of the _header.md or _header.html file on the current document's directory.
	ContentHeader template.HTML

	// The HTML of the _footer.md or _footer.html file on the current document's directory.
	ContentFooter template.HTML

	// An array of maps that contains names and links of all the items on the document root.
	// Names begginning with "." or "_" are ignored in this list.
	Menu []map[string]interface{}

	// An array of maps that contains names and links of all the items on the current document's directory.
	// Names begginning with "." or "_" are ignored in this list.
	SideMenu []map[string]interface{}

	// An array of maps that contains names and links of the current document's path.
	BreadCrumb []map[string]interface{}

	// A map that contains name and link of the current page.
	CurrentPage map[string]interface{}

	// Absolute path of the current document.
	FilePath string

	// Absolute parent directory of the current document.
	FileDir string

	// Relative path of the current document.
	BasePath string

	// Relative parent directory of the current document.
	BaseDir string

	// True if the current document is / (home).
	IsHome bool
}

This structure holds information on the current document served by Luminos.

func (*Page) CreateBreadCrumb

func (p *Page) CreateBreadCrumb()

Populates Page.BreadCrumb with links.

func (p *Page) CreateLink(file os.FileInfo, prefix string) map[string]interface{}

Returns a link.

func (*Page) CreateMenu

func (p *Page) CreateMenu()

func (*Page) CreateSideMenu

func (p *Page) CreateSideMenu()

Populates Page.SideMenu with files on the current document's directory.

Jump to

Keyboard shortcuts

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