Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs

Added Page.Author(s) functions
Added schema, opengraph, twitter_cards, google_news metadata templates
Added "" template
This commit is contained in:
Derek Perkins
2014-12-09 11:33:55 -07:00
committed by spf13
parent fd33e5d202
commit 8f6f871f53
5 changed files with 233 additions and 2 deletions

View File

@@ -88,6 +88,8 @@ type targetList struct {
type SiteInfo struct {
BaseUrl template.URL
Taxonomies TaxonomyList
Authors AuthorList
Social SiteSocial
Indexes *TaxonomyList // legacy, should be identical to Taxonomies
Sections Taxonomy
Pages *Pages
@@ -105,6 +107,21 @@ type SiteInfo struct {
BuildDrafts bool
}
// SiteSocial is a place to put social details on a site level. These are the
// standard keys that themes will expect to have available, but can be
// expanded to any others on a per site basis
// github
// facebook
// facebook_admin
// twitter
// twitter_domain
// googleplus
// pinterest
// instagram
// youtube
// linkedin
type SiteSocial map[string]string
func (s *SiteInfo) GetParam(key string) interface{} {
v := s.Params[strings.ToLower(key)]