Add more docs

develop
Nikita Tokarchuk 3 years ago
parent 8e92ba0f9e
commit a9b5ac4df2
Signed by: mainnika
GPG Key ID: A595FB7E3E56911C
  1. 3
      frontend/ghost/ghost.go
  2. 1
      frontend/templates/funcs.go

@ -4,7 +4,10 @@ package ghost
// Client is the ghost backend client // Client is the ghost backend client
type Client interface { type Client interface {
// GetPosts returns blog posts according to query params
GetPosts(queryParams ...Modifier) (posts *Posts, err error) GetPosts(queryParams ...Modifier) (posts *Posts, err error)
// GetPostBySlug returns a single post by its slug title and query params
GetPostBySlug(slug string, queryParams ...Modifier) (posts *Posts, err error) GetPostBySlug(slug string, queryParams ...Modifier) (posts *Posts, err error)
// GetPageBySlug returns a single page by its slug title and query params
GetPageBySlug(slug string, queryParams ...Modifier) (pages *Pages, err error) GetPageBySlug(slug string, queryParams ...Modifier) (pages *Pages, err error)
} }

@ -2,6 +2,7 @@ package templates
import "html/template" import "html/template"
// UseFuncs returns a func map with template helpers functions
func UseFuncs() template.FuncMap { func UseFuncs() template.FuncMap {
return template.FuncMap{ return template.FuncMap{
"add": func(i int) int { "add": func(i int) int {

Loading…
Cancel
Save