diff --git a/README.md b/README.md index 986db0a..7bb997c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -go-LeanSite +[go-LeanSite](http://godoc.org/github.com/metaleap/go-leansite) =========== A super-minimalistic "dynamic-web-page" server written in Go, just to explore the net/http, html/template, and Gorilla web packages. diff --git a/__doc.html b/__doc.html new file mode 100644 index 0000000..4c413b0 --- /dev/null +++ b/__doc.html @@ -0,0 +1,388 @@ + +
+var ( + DirPath string + DirWatch *uio.Watcher + Router *mux.Router + SiteData struct { + TopNav NavItems + Blogs map[string]BlogNav + // contains filtered or unexported fields + } +)+ + + + + + +
func Init(dirPath string) (err error)+ + + + + +
func ListenAndServe(addr string) (err error)+ + + + + + +
type BlogNav struct { + Nav BlogNavItems + // contains filtered or unexported fields +}+ + + + + + + + + + + + +
func (me *BlogNav) ShowYear(year string) (dif bool)+ + + + + + + +
type BlogNavItem struct { + NavItem + Year, Month, Day string +}+ + + + + + + + + + + + + + +
type BlogNavItems []BlogNavItem+ + + + + + + + + + + + +
func (me BlogNavItems) Len() int+ + + + + +
func (me BlogNavItems) Less(i, j int) bool+ + + + + +
func (me BlogNavItems) Swap(i, j int)+ + + + + + + +
type NavItem struct { + CssClass, Href, Caption, Desc string +}+ + + + + + + + + + + + +
func (me *NavItem) IsActive(pc *PageContext) bool+ + + + + + + +
type NavItems []NavItem+ + + + + + + + + + + + + + +
type PageContext struct { + R *http.Request + Path, PageTitle string + HtmlContent template.HTML + TopNav NavItems + Year int +}+ + + + + + + + + + +
func NewPageContext(r *http.Request, path string) (me *PageContext)+ + + + + + +
func (me *PageContext) GetBlogArchive(path string) *BlogNav+ + + + + + + + + + + + + + + +
Name | ++ | Synopsis | +
---|---|---|
.. | +||
helloworld | ++ | + |