lp

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadCss added in v0.0.4

func DownloadCss(path string) error

func Lp

func Lp(action string, follow bool, lpconfig string, siteTemplate []string)

Lp calls mustUnmarshalYaml for configs, writePages to write appropriate files, serveLP to host

Types

type LpConfig

type LpConfig struct {
	Lpconfig struct {
		RootDir  string `yaml:"rootDir"`
		Port     int    `yaml:"port"`
		Sitename string `yaml:"sitename"`
		Tls      struct {
			Key  string `yaml:"key"`
			Cert string `yaml:"cert"`
			Ca   string `yaml:"ca"`
		} `yaml:"tls"`
	} `yaml:"lpconfig"`
	// contains filtered or unexported fields
}

LpConfig set config for site hosting

type SiteData

type SiteData struct {
	Template struct {
		Theme string `yaml:"Theme,omitempty"`
		Pages []struct {
			IsIndex  bool   `yaml:"IsIndex,omitempty"`
			Name     string `yaml:"Name"`
			Headings []struct {
				Name  string `yaml:"Name"`
				Links []struct {
					Name string              `yaml:"Name"`
					Url  string              `yaml:"Url,omitempty"`
					Urls []map[string]string `yaml:"Urls,omitempty"`
				} `yaml:"Links"`
			} `yaml:"Headings"`
		} `yaml:"Pages"`
	} `yaml:"Template"`
}

SiteData is the meat and potatoes of LP. Used to create html page of links.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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