setting

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOCAL  = "local"
	REMOTE = "remote"
)

Variables

View Source
var (
	CustomConf = "custom/app.ini"

	AppVer   string
	ProdMode bool
	HTTPPort int

	Site struct {
		Name   string
		Desc   string
		UseCDN bool
		URL    string
	}

	Page struct {
		HasLandingPage bool
		DocsBaseURL    string

		UseCustomTpl   bool
		NavbarTplPath  string
		HomeTplPath    string
		DocsTplPath    string
		FooterTplPath  string
		DisqusTplPath  string
		DuoShuoTplPath string
	}

	Navbar struct {
		Items []*NavbarItem
	}

	Asset struct {
		CustomCSS string
	}

	Docs struct {
		Type   DocType
		Target string
		Secret string
		Langs  []string

		// Only used for languages are not en-US or zh-CN to bypass error panic.
		Locales map[string][]byte
	}

	Extension struct {
		EnableEditPage       bool
		EditPageLinkFormat   string
		EnableDisqus         bool
		DisqusShortName      string
		EnableDuoShuo        bool
		DuoShuoShortName     string
		HighlightJSCustomCSS string
		EnableSearch         bool
		GABlock              string
	}

	Cfg *ini.File
)

Functions

func NewContext

func NewContext()

Types

type DocType

type DocType string

func (DocType) IsLocal

func (t DocType) IsLocal() bool

func (DocType) IsRemote

func (t DocType) IsRemote() bool
type NavbarItem struct {
	Icon         string
	Locale, Link string
	Blank        bool
}

Jump to

Keyboard shortcuts

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