-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video s…
…tructs Added Page.Author(s) functions Added schema, opengraph, twitter_cards, google_news metadata templates Added "" template
- Loading branch information
1 parent
9f77f93
commit d2f6ecc
Showing
5 changed files
with
233 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright © 2013 Steve Francia <spf@spf13.com>. | ||
// | ||
// Licensed under the Simple Public License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://opensource.org/licenses/Simple-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package hugolib | ||
|
||
/* | ||
* An author list is a list of all authors and their metadata | ||
*/ | ||
type AuthorList map[string]Author | ||
|
||
/* | ||
* An author contains details about the author of a page | ||
*/ | ||
type Author struct { | ||
GivenName string | ||
FamilyName string | ||
DisplayName string | ||
Thumbnail string | ||
Image string | ||
ShortBio string | ||
LongBio string | ||
Email string | ||
Social AuthorSocial | ||
} | ||
|
||
// AuthorSocial is a place to put social details per author. These are the | ||
// standard keys that themes will expect to have available, but can be | ||
// expanded to any others on a per site basis | ||
// - website | ||
// - github | ||
// - googleplus | ||
// - youtube | ||
// - skype | ||
type AuthorSocial map[string]string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright © 2013 Steve Francia <spf@spf13.com>. | ||
// | ||
// Licensed under the Simple Public License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// http://opensource.org/licenses/Simple-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package hugolib | ||
|
||
// An image contains metadata for images + image sitemaps | ||
// https://support.google.com/webmasters/answer/178636?hl=en | ||
type Image struct { | ||
|
||
// The URL of the image. In some cases, the image URL may not be on the | ||
// same domain as your main site. This is fine, as long as both domains | ||
// are verified in Webmaster Tools. If, for example, you use a | ||
// content delivery network (CDN) to host your images, make sure that the | ||
// hosting site is verified in Webmaster Tools OR that you submit your | ||
// sitemap using robots.txt. In addition, make sure that your robots.txt | ||
// file doesn’t disallow the crawling of any content you want indexed. | ||
URL string | ||
Title string | ||
Caption string | ||
AltText string | ||
|
||
// The geographic location of the image. For example, | ||
// <image:geo_location>Limerick, Ireland</image:geo_location>. | ||
GeoLocation string | ||
|
||
// A URL to the license of the image. | ||
License string | ||
} | ||
|
||
// An video contains metadata for videos + video sitemaps | ||
// https://support.google.com/webmasters/answer/80471?hl=en | ||
type Video struct { | ||
ThumbnailLoc string | ||
Title string | ||
Description string | ||
ContentLoc string | ||
PlayerLoc string | ||
Duration string | ||
ExpirationDate string | ||
Rating string | ||
ViewCount string | ||
PublicationDate string | ||
FamilyFriendly string | ||
Restriction string | ||
GalleryLoc string | ||
Price string | ||
RequiresSubscription string | ||
Uploader string | ||
Live string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters