github.com/jbramsden/hugo@v0.47.1/hugolib/media.go (about)

     1  // Copyright 2015 The Hugo Authors. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  // http://www.apache.org/licenses/LICENSE-2.0
     7  //
     8  // Unless required by applicable law or agreed to in writing, software
     9  // distributed under the License is distributed on an "AS IS" BASIS,
    10  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  package hugolib
    15  
    16  // An Image contains metadata for images + image sitemaps
    17  // https://support.google.com/webmasters/answer/178636?hl=en
    18  type Image struct {
    19  
    20  	// The URL of the image. In some cases, the image URL may not be on the
    21  	// same domain as your main site. This is fine, as long as both domains
    22  	// are verified in Webmaster Tools. If, for example, you use a
    23  	// content delivery network (CDN) to host your images, make sure that the
    24  	// hosting site is verified in Webmaster Tools OR that you submit your
    25  	// sitemap using robots.txt. In addition, make sure that your robots.txt
    26  	// file doesn’t disallow the crawling of any content you want indexed.
    27  	URL     string
    28  	Title   string
    29  	Caption string
    30  	AltText string
    31  
    32  	// The geographic location of the image. For example,
    33  	// <image:geo_location>Limerick, Ireland</image:geo_location>.
    34  	GeoLocation string
    35  
    36  	// A URL to the license of the image.
    37  	License string
    38  }
    39  
    40  // A Video contains metadata for videos + video sitemaps
    41  // https://support.google.com/webmasters/answer/80471?hl=en
    42  type Video struct {
    43  	ThumbnailLoc         string
    44  	Title                string
    45  	Description          string
    46  	ContentLoc           string
    47  	PlayerLoc            string
    48  	Duration             string
    49  	ExpirationDate       string
    50  	Rating               string
    51  	ViewCount            string
    52  	PublicationDate      string
    53  	FamilyFriendly       string
    54  	Restriction          string
    55  	GalleryLoc           string
    56  	Price                string
    57  	RequiresSubscription string
    58  	Uploader             string
    59  	Live                 string
    60  }