2018-05-04 11:53:56 -04:00
// Copyright 2018 The Hugo Authors. All rights reserved.
2014-01-09 17:33:20 -05:00
//
2015-11-23 22:16:36 -05:00
// Licensed under the Apache License, Version 2.0 (the "License");
2014-01-09 17:33:20 -05:00
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
2015-11-23 22:16:36 -05:00
// http://www.apache.org/licenses/LICENSE-2.0
2014-01-09 17:33:20 -05:00
//
// 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.
2018-05-04 11:53:56 -04:00
// This file is autogenerated.
2014-01-09 17:33:20 -05:00
2018-05-04 11:53:56 -04:00
// Package embedded defines the internal templates that Hugo provides.
package embedded
2014-04-09 17:45:34 -04:00
2018-05-04 11:53:56 -04:00
var EmbeddedTemplates = [ ] [ 2 ] string {
{ ` _default/robots.txt ` , ` User-agent: * ` } ,
{ ` _default/rss.xml ` , ` < rss version = "2.0" xmlns : atom = "http://www.w3.org/2005/Atom" >
2014-04-09 17:45:34 -04:00
< channel >
2016-11-20 06:54:17 -05:00
< title > { { if eq . Title . Site . Title } } { { . Site . Title } } { { else } } { { with . Title } } { { . } } on { { end } } { { . Site . Title } } { { end } } < / title >
2014-04-09 17:45:34 -04:00
< link > { { . Permalink } } < / link >
2016-11-20 06:54:17 -05:00
< description > Recent content { { if ne . Title . Site . Title } } { { with . Title } } in { { . } } { { end } } { { end } } on { { . Site . Title } } < / description >
2015-01-30 08:24:44 -05:00
< generator > Hugo -- gohugo . io < / generator > { { with . Site . LanguageCode } }
2016-09-18 13:10:11 -04:00
< language > { { . } } < / language > { { end } } { { with . Site . Author . email } }
< managingEditor > { { . } } { { with $ . Site . Author . name } } ( { { . } } ) { { end } } < / managingEditor > { { end } } { { with . Site . Author . email } }
< webMaster > { { . } } { { with $ . Site . Author . name } } ( { { . } } ) { { end } } < / webMaster > { { end } } { { with . Site . Copyright } }
2015-01-30 08:24:44 -05:00
< copyright > { { . } } < / copyright > { { end } } { { if not . Date . IsZero } }
2015-03-18 01:16:54 -04:00
< lastBuildDate > { { . Date . Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML } } < / lastBuildDate > { { end } }
2017-03-25 05:14:12 -04:00
{ { with . OutputFormats . Get "RSS" } }
{ { printf "<atom:link href=%q rel=\"self\" type=%q />" . Permalink . MediaType | safeHTML } }
{ { end } }
2017-02-13 11:11:22 -05:00
{ { range . Data . Pages } }
2014-04-09 17:45:34 -04:00
< item >
< title > { { . Title } } < / title >
< link > { { . Permalink } } < / link >
2015-03-18 01:16:54 -04:00
< pubDate > { { . Date . Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML } } < / pubDate >
2016-09-18 13:10:11 -04:00
{ { with . Site . Author . email } } < author > { { . } } { { with $ . Site . Author . name } } ( { { . } } ) { { end } } < / author > { { end } }
2014-04-09 17:45:34 -04:00
< guid > { { . Permalink } } < / guid >
2017-03-25 17:58:41 -04:00
< description > { { . Summary | html } } < / description >
2014-04-09 17:45:34 -04:00
< / item >
{ { end } }
< / channel >
2018-05-04 11:53:56 -04:00
< / rss > ` } ,
{ ` _default/sitemap.xml ` , ` < urlset xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9"
2017-10-17 14:56:50 -04:00
xmlns : xhtml = "http://www.w3.org/1999/xhtml" >
2014-05-06 06:50:23 -04:00
{ { range . Data . Pages } }
< url >
2015-05-14 17:58:14 -04:00
< loc > { { . Permalink } } < / loc > { { if not . Lastmod . IsZero } }
< lastmod > { { safeHTML ( . Lastmod . Format "2006-01-02T15:04:05-07:00" ) } } < / lastmod > { { end } } { { with . Sitemap . ChangeFreq } }
2014-05-06 11:02:56 -04:00
< changefreq > { { . } } < / changefreq > { { end } } { { if ge . Sitemap . Priority 0.0 } }
2017-04-22 16:37:14 -04:00
< priority > { { . Sitemap . Priority } } < / priority > { { end } } { { if . IsTranslated } } { { range . Translations } }
< xhtml : link
rel = "alternate"
hreflang = "{{ .Lang }}"
href = "{{ .Permalink }}"
/ > { { end } }
< xhtml : link
rel = "alternate"
hreflang = "{{ .Lang }}"
href = "{{ .Permalink }}"
/ > { { end } }
2014-05-06 06:50:23 -04:00
< / url >
{ { end } }
2018-05-04 11:53:56 -04:00
< / urlset > ` } ,
{ ` _default/sitemapindex.xml ` , ` < sitemapindex xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" >
2016-08-04 16:12:19 -04:00
{ { range . } }
< sitemap >
< loc > { { . SitemapAbsURL } } < / loc >
{ { if not . LastChange . IsZero } }
< lastmod > { { . LastChange . Format "2006-01-02T15:04:05-07:00" | safeHTML } } < / lastmod >
{ { end } }
< / sitemap >
{ { end } }
< / sitemapindex >
2018-05-04 11:53:56 -04:00
` } ,
2018-05-22 08:00:36 -04:00
{ ` disqus.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . Disqus - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { if . Site . DisqusShortname } } < div id = "disqus_thread" > < / div >
2017-06-27 11:45:48 -04:00
< script >
2017-06-27 07:40:01 -04:00
var disqus_config = function ( ) {
{ { with . GetParam "disqus_identifier" } } this . page . identifier = ' { { . } } ' ; { { end } }
{ { with . GetParam "disqus_title" } } this . page . title = ' { { . } } ' ; { { end } }
{ { with . GetParam "disqus_url" } } this . page . url = ' { { . | html } } ' ; { { end } }
} ;
2014-04-23 02:52:01 -04:00
( function ( ) {
2017-06-27 07:40:01 -04:00
if ( [ "localhost" , "127.0.0.1" ] . indexOf ( window . location . hostname ) != - 1 ) {
document . getElementById ( ' disqus_thread ' ) . innerHTML = ' Disqus comments not available by default when the website is previewed locally . ' ;
return ;
}
2017-06-27 11:45:48 -04:00
var d = document , s = d . createElement ( ' script ' ) ; s . async = true ;
s . src = ' //' + {{ .Site.DisqusShortname }} + '.disqus.com/embed.js';
s . setAttribute ( ' data - timestamp ' , + new Date ( ) ) ;
( d . head || d . body ) . appendChild ( s ) ;
2014-04-23 02:52:01 -04:00
} ) ( ) ;
< / script >
2017-08-22 13:55:29 -04:00
< noscript > Please enable JavaScript to view the < a href = "https://disqus.com/?ref_noscript" > comments powered by Disqus . < / a > < / noscript >
2018-05-20 14:00:29 -04:00
< a href = "https://disqus.com" class = "dsq-brlink" > comments powered by < span class = "logo-disqus" > Disqus < / span > < / a > { { end } }
{ { - end - } } ` } ,
2018-05-21 04:21:36 -04:00
{ ` google_analytics.html ` , ` { { - $ pc := . Site . PrivacyConfig . GoogleAnalytics - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { with . Site . GoogleAnalytics } }
2018-05-04 11:53:56 -04:00
< script >
2018-05-21 04:18:36 -04:00
{ { template "__ga_js_set_doNotTrack" $ } }
if ( ! doNotTrack ) {
( function ( i , s , o , g , r , a , m ) { i [ ' GoogleAnalyticsObject ' ] = r ; i [ r ] = i [ r ] || function ( ) {
( i [ r ] . q = i [ r ] . q || [ ] ) . push ( arguments ) } , i [ r ] . l = 1 * new Date ( ) ; a = s . createElement ( o ) ,
m = s . getElementsByTagName ( o ) [ 0 ] ; a . async = 1 ; a . src = g ; m . parentNode . insertBefore ( a , m )
} ) ( window , document , ' script ',' https : //www.google-analytics.com/analytics.js','ga');
ga ( ' create ' , ' { { . } } ' , ' auto ' ) ;
ga ( ' send ' , ' pageview ' ) ;
}
2018-05-04 11:53:56 -04:00
< / script >
2018-05-20 14:00:29 -04:00
{ { end } }
2018-05-21 04:18:36 -04:00
{ { - end - } }
{ { - define "__ga_js_set_doNotTrack" - } } { { /* This is also used in the async version. */ } }
{ { - $ pc := . Site . PrivacyConfig . GoogleAnalytics - } }
{ { - if not $ pc . RespectDoNotTrack - } }
var doNotTrack = false ;
{ { - else - } }
var dnt = ( navigator . doNotTrack || window . doNotTrack || navigator . msDoNotTrack ) ;
var doNotTrack = ( dnt == "1" || dnt == "yes" ) ;
{ { - end - } }
2018-05-20 14:00:29 -04:00
{ { - end - } } ` } ,
2018-05-21 04:21:36 -04:00
{ ` google_analytics_async.html ` , ` { { - $ pc := . Site . PrivacyConfig . GoogleAnalytics - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { with . Site . GoogleAnalytics } }
2018-05-04 11:53:56 -04:00
< script >
2018-05-21 04:18:36 -04:00
{ { template "__ga_js_set_doNotTrack" $ } }
if ( ! doNotTrack ) {
window . ga = window . ga || function ( ) { ( ga . q = ga . q || [ ] ) . push ( arguments ) } ; ga . l = + new Date ;
ga ( ' create ' , ' { { . } } ' , ' auto ' ) ;
ga ( ' send ' , ' pageview ' ) ;
}
2018-05-04 11:53:56 -04:00
< / script >
< script async src = ' //www.google-analytics.com/analytics.js'></script>
2018-05-20 14:00:29 -04:00
{ { end } }
{ { - end - } } ` } ,
2018-05-04 11:53:56 -04:00
{ ` google_news.html ` , ` { { if . IsPage } } { { with . Params . news_keywords } }
< meta name = "news_keywords" content = "{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}" / >
{ { end } } { { end } } ` } ,
{ ` opengraph.html ` , ` < meta property = "og:title" content = "{{ .Title }}" / >
2015-02-01 13:56:21 -05:00
< meta property = "og:description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" / >
2014-12-09 13:33:55 -05:00
< meta property = "og:type" content = "{{ if .IsPage }}article{{ else }}website{{ end }}" / >
< meta property = "og:url" content = "{{ .Permalink }}" / >
{ { with . Params . images } } { { range first 6 . } }
2015-11-02 14:49:15 -05:00
< meta property = "og:image" content = "{{ . | absURL }}" / >
2014-12-09 13:33:55 -05:00
{ { end } } { { end } }
2017-01-22 09:06:41 -05:00
{ { if . IsPage } }
{ { if not . PublishDate . IsZero } } < meta property = "article:published_time" content = "{{ .PublishDate.Format " 2006 - 01 - 02 T15 : 04 : 05 - 07 : 00 " | safeHTML }}" / >
{ { else if not . Date . IsZero } } < meta property = "article:published_time" content = "{{ .Date.Format " 2006 - 01 - 02 T15 : 04 : 05 - 07 : 00 " | safeHTML }}" / > { { end } }
{ { if not . Lastmod . IsZero } } < meta property = "article:modified_time" content = "{{ .Lastmod.Format " 2006 - 01 - 02 T15 : 04 : 05 - 07 : 00 " | safeHTML }}" / > { { end } }
{ { else } }
2017-02-21 08:18:59 -05:00
{ { if not . Date . IsZero } } < meta property = "og:updated_time" content = "{{ .Date.Format " 2006 - 01 - 02 T15 : 04 : 05 - 07 : 00 " | safeHTML }}" / > { { end } }
2017-01-22 09:06:41 -05:00
{ { end } } { { with . Params . audio } }
2014-12-09 13:33:55 -05:00
< meta property = "og:audio" content = "{{ . }}" / > { { end } } { { with . Params . locale } }
< meta property = "og:locale" content = "{{ . }}" / > { { end } } { { with . Site . Params . title } }
< meta property = "og:site_name" content = "{{ . }}" / > { { end } } { { with . Params . videos } }
2017-12-01 05:17:46 -05:00
{ { range . } }
2015-11-02 14:49:15 -05:00
< meta property = "og:video" content = "{{ . | absURL }}" / >
2015-01-20 04:43:42 -05:00
{ { end } } { { end } }
2014-12-09 13:33:55 -05:00
< ! -- If it is part of a series , link to related articles -- >
{ { $ permalink := . Permalink } }
{ { $ siteSeries := . Site . Taxonomies . series } } { { with . Params . series } }
{ { range $ name := . } }
{ { $ series := index $ siteSeries $ name } }
{ { range $ page := first 6 $ series . Pages } }
{ { if ne $ page . Permalink $ permalink } } < meta property = "og:see_also" content = "{{ $page.Permalink }}" / > { { end } }
{ { end } }
{ { end } } { { end } }
{ { if . IsPage } }
{ { range . Site . Authors } } { { with . Social . facebook } }
< meta property = "article:author" content = "https://www.facebook.com/{{ . }}" / > { { end } } { { with . Site . Social . facebook } }
< meta property = "article:publisher" content = "https://www.facebook.com/{{ . }}" / > { { end } }
< meta property = "article:section" content = "{{ .Section }}" / >
{ { with . Params . tags } } { { range first 6 . } }
< meta property = "article:tag" content = "{{ . }}" / > { { end } } { { end } }
2015-01-20 04:43:42 -05:00
{ { end } } { { end } }
2014-12-09 13:33:55 -05:00
< ! -- Facebook Page Admin ID for Domain Insights -- >
2018-05-04 11:53:56 -04:00
{ { with . Site . Social . facebook_admin } } < meta property = "fb:admins" content = "{{ . }}" / > { { end } } ` } ,
{ ` pagination.html ` , ` { { $ pag := $ . Paginator } }
{ { if gt $ pag . TotalPages 1 } }
< ul class = "pagination" >
{ { with $ pag . First } }
< li >
< a href = "{{ .URL }}" aria - label = "First" > < span aria - hidden = "true" > & laquo ; & laquo ; < / span > < / a >
< / li >
{ { end } }
< li
{ { if not $ pag . HasPrev } } class = "disabled" { { end } } >
< a href = "{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria - label = "Previous" > < span aria - hidden = "true" > & laquo ; < / span > < / a >
< / li >
{ { $ . Scratch . Set "__paginator.ellipsed" false } }
{ { range $ pag . Pagers } }
{ { $ right := sub . TotalPages . PageNumber } }
{ { $ showNumber := or ( le . PageNumber 3 ) ( eq $ right 0 ) } }
{ { $ showNumber := or $ showNumber ( and ( gt . PageNumber ( sub $ pag . PageNumber 2 ) ) ( lt . PageNumber ( add $ pag . PageNumber 2 ) ) ) } }
{ { if $ showNumber } }
{ { $ . Scratch . Set "__paginator.ellipsed" false } }
{ { $ . Scratch . Set "__paginator.shouldEllipse" false } }
{ { else } }
{ { $ . Scratch . Set "__paginator.shouldEllipse" ( not ( $ . Scratch . Get "__paginator.ellipsed" ) ) } }
{ { $ . Scratch . Set "__paginator.ellipsed" true } }
{ { end } }
{ { if $ showNumber } }
< li
{ { if eq . $ pag } } class = "active" { { end } } > < a href = "{{ .URL }}" > { { . PageNumber } } < / a > < / li >
{ { else if ( $ . Scratch . Get "__paginator.shouldEllipse" ) } }
< li class = "disabled" > < span aria - hidden = "true" > & hellip ; < / span > < / li >
{ { end } }
{ { end } }
< li
{ { if not $ pag . HasNext } } class = "disabled" { { end } } >
< a href = "{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria - label = "Next" > < span aria - hidden = "true" > & raquo ; < / span > < / a >
< / li >
{ { with $ pag . Last } }
< li >
< a href = "{{ .URL }}" aria - label = "Last" > < span aria - hidden = "true" > & raquo ; & raquo ; < / span > < / a >
< / li >
{ { end } }
< / ul >
{ { end } } ` } ,
{ ` schema.html ` , ` { { with . Site . Social . GooglePlus } } < link rel = "publisher" href = "{{ . }}" / > { { end } }
< meta itemprop = "name" content = "{{ .Title }}" >
< meta itemprop = "description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" >
2014-12-09 13:33:55 -05:00
2018-05-04 11:53:56 -04:00
{ { if . IsPage } } { { $ ISO8601 := "2006-01-02T15:04:05-07:00" } } { { if not . PublishDate . IsZero } }
< meta itemprop = "datePublished" content = "{{ .PublishDate.Format $ISO8601 | safeHTML }}" / > { { end } }
{ { if not . Date . IsZero } } < meta itemprop = "dateModified" content = "{{ .Date.Format $ISO8601 | safeHTML }}" / > { { end } }
< meta itemprop = "wordCount" content = "{{ .WordCount }}" >
{ { with . Params . images } } { { range first 6 . } }
< meta itemprop = "image" content = "{{ . | absURL }}" >
{ { end } } { { end } }
< ! -- Output all taxonomies as schema . org keywords -- >
< meta itemprop = "keywords" content = "{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf " % s , " $term }}{{ end }}{{ end }}{{ end }}" / >
{ { end } } ` } ,
2018-05-21 11:34:21 -04:00
{ ` shortcodes/__h_simple_assets.html ` , ` { { define "__h_simple_css" } } { { /* This is also used in other "simple" variants. These template definitions are global. */ } }
{ { if not ( . Page . Scratch . Get "__h_simple_css" ) } }
{ { /* Only include once */ } }
{ { . Page . Scratch . Set "__h_simple_css" true } }
< style >
. __h_youtube {
position : relative ; padding - bottom : 56.23 % ; height : 0 ;
overflow : hidden ;
max - width : 100 % ;
background : # 000 ;
margin : 5 px ;
}
. __h_youtube img {
min - width : 100 % ;
height : auto ;
color : # 000 ;
}
. __h_youtube . play {
height : 72 px ;
width : 72 px ;
left : 50 % ;
top : 50 % ;
margin - left : - 36 px ;
margin - top : - 36 px ;
position : absolute ;
cursor : pointer ;
}
< / style >
{ { end } }
{ { end } }
{ { - define "__h_simple_icon_play" - } }
M66 .52 , 7.74 c - 0.78 - 2.93 - 2.49 - 5.41 - 5.42 - 6.19 C55 .79 , .13 , 34 , 0 , 34 , 0 S12 .21 , .13 , 6.9 , 1.55 C3 .97 , 2.33 , 2.27 , 4.81 , 1.48 , 7.74 C0 .06 , 13.05 , 0 , 24 , 0 , 24 s0 .06 , 10.95 , 1.48 , 16.26 c0 .78 , 2.93 , 2.49 , 5.41 , 5.42 , 6.19 C12 .21 , 47.87 , 34 , 48 , 34 , 48 s21 .79 - 0.13 , 27.1 - 1.55 c2 .93 - 0.78 , 4.64 - 3.26 , 5.42 - 6.19 C67 .94 , 34.95 , 68 , 24 , 68 , 24 S67 .94 , 13.05 , 66.52 , 7.74 z
{ { - end - } }
` } ,
2018-05-04 11:53:56 -04:00
{ ` shortcodes/figure.html ` , ` < ! -- image -- >
< figure { { with . Get "class" } } class = "{{.}}" { { end } } >
{ { if . Get "link" } } < a href = "{{ .Get " link " }}" { { with . Get "target" } } target = "{{ . }}" { { end } } { { with . Get "rel" } } rel = "{{ . }}" { { end } } > { { end } }
< img src = "{{ .Get " src " }}" { { if or ( . Get "alt" ) ( . Get "caption" ) } } alt = "{{ with .Get " alt "}}{{.}}{{else}}{{ .Get " caption " }}{{ end }}" { { end } } { { with . Get "width" } } width = "{{.}}" { { end } } { { with . Get "height" } } height = "{{.}}" { { end } } / >
{ { if . Get "link" } } < / a > { { end } }
{ { if or ( or ( . Get "title" ) ( . Get "caption" ) ) ( . Get "attr" ) } }
< figcaption > { { if isset . Params "title" } }
< h4 > { { . Get "title" } } < / h4 > { { end } }
{ { if or ( . Get "caption" ) ( . Get "attr" ) } } < p >
{ { . Get "caption" } }
{ { with . Get "attrlink" } } < a href = "{{.}}" > { { end } }
{ { . Get "attr" } }
{ { if . Get "attrlink" } } < / a > { { end } }
< / p > { { end } }
< / figcaption >
{ { end } }
< / figure >
< ! -- image -- > ` } ,
{ ` shortcodes/gist.html ` , ` <script src="//gist.github.com/ {{ index .Params 0 }} / {{ index .Params 1 }} .js {{ if len .Params | eq 3 }} ?file= {{ index .Params 2 }} {{ end }} "></script> ` } ,
{ ` shortcodes/highlight.html ` , ` {{ if len .Params | eq 2 }} {{ highlight ( trim .Inner "\n\r" ) ( .Get 0 ) ( .Get 1 ) }} {{ else }} {{ highlight ( trim .Inner "\n\r" ) ( .Get 0 ) "" }} {{ end }} ` } ,
2018-05-22 08:00:36 -04:00
{ ` shortcodes/instagram.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . Instagram - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { if len . Params | eq 2 } } { { if eq ( . Get 1 ) "hidecaption" } } { { with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" ( index . Params 0 ) "/&hidecaption=1" } } { { . html | safeHTML } } { { end } } { { end } } { { else } } { { with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" ( index . Params 0 ) "/&hidecaption=0" } } { { . html | safeHTML } } { { end } } { { end } }
{ { - end - } } ` } ,
2018-05-04 11:53:56 -04:00
{ ` shortcodes/ref.html ` , ` {{ if len .Params | eq 2 }} {{ ref .Page ( .Get 0 ) ( .Get 1 ) }} {{ else }} {{ ref .Page ( .Get 0 ) }} {{ end }} ` } ,
{ ` shortcodes/relref.html ` , ` {{ if len .Params | eq 2 }} {{ relref .Page ( .Get 0 ) ( .Get 1 ) }} {{ else }} {{ relref .Page ( .Get 0 ) }} {{ end }} ` } ,
2018-05-22 08:00:36 -04:00
{ ` shortcodes/speakerdeck.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . SpeakerDeck - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
< script async class = ' speakerdeck - embed ' data - id = ' { { index . Params 0 } } ' data - ratio = ' 1.33333333333333 ' src = ' //speakerdeck.com/assets/embed.js'></script>
{ { - end - } } ` } ,
2018-05-22 08:00:36 -04:00
{ ` shortcodes/tweet.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . Tweet - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { ( getJSON "https://api.twitter.com/1/statuses/oembed.json?id=" ( index . Params 0 ) ) . html | safeHTML } }
{ { - end - } } ` } ,
2018-05-22 08:00:36 -04:00
{ ` shortcodes/vimeo.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . Vimeo - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
{ { if . IsNamedParams } } < div { { if . Get "class" } } class = "{{ .Get " class " }}" { { else } } style = "position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;" { { end } } >
2018-05-04 11:53:56 -04:00
< iframe src = "//player.vimeo.com/video/{{ .Get " id " }}" { { if not ( . Get "class" ) } } style = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;" { { end } } webkitallowfullscreen mozallowfullscreen allowfullscreen > < / iframe >
< / div > { { else } }
< div { { if len . Params | eq 2 } } class = "{{ .Get 1 }}" { { else } } style = "position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;" { { end } } >
< iframe src = "//player.vimeo.com/video/{{ .Get 0 }}" { { if len . Params | eq 1 } } style = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;" { { end } } webkitallowfullscreen mozallowfullscreen allowfullscreen > < / iframe >
< / div >
2018-05-20 14:00:29 -04:00
{ { end } }
{ { - end - } } ` } ,
2018-05-22 08:00:36 -04:00
{ ` shortcodes/youtube.html ` , ` { { - $ pc := . Page . Site . Config . Privacy . YouTube - } }
2018-05-20 14:00:29 -04:00
{ { - if not $ pc . Disable - } }
2018-05-21 11:34:21 -04:00
{ { - $ ytHost := cond $ pc . PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" - } }
{ { - if $ pc . Simple - } }
{ { template "_internal/shortcodes/youtube_simple.html" . } }
{ { - else - } }
{ { - $ id := . Get "id" | default ( . Get 0 ) - } }
{ { - $ class := . Get "class" | default ( . Get 1 ) } }
< div { { with $ class } } class = "{{ . }}" { { else } } style = "position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;" { { end } } >
< iframe src = "//{{ $ytHost }}/embed/{{ $id }}{{ with .Get " autoplay " }}{{ if eq . " true " }}?autoplay=1{{ end }}{{ end }}" { { if not $ class } } style = "position: absolute; top: 0; left: 0; width: 100%; height: 100%;" { { end } } allowfullscreen frameborder = "0" title = "YouTube Video" > < / iframe >
< / div >
2018-05-20 14:00:29 -04:00
{ { end } }
{ { - end - } } ` } ,
2018-05-21 11:34:21 -04:00
{ ` shortcodes/youtube_simple.html ` , ` { { $ id := . Get "id" | default ( . Get 0 ) } }
{ { $ class := . Get "class" | default ( . Get 1 ) } }
{ { $ hasClass := $ class } }
{ { $ class := $ class | default "__h_youtube" } }
{ { if not $ hasClass } }
{ { /* If class is set, assume the user wants to provide his own styles. */ } }
{ { template "__h_simple_css" $ } }
{ { end } }
2018-05-22 03:11:34 -04:00
{ { $ secondClass := "s_youtube_simple" } }
{ { $ divID := printf "%s_%d" $ secondClass ( add $ . Ordinal 1 ) } }
< div class = "{{ $secondClass }} {{ $class }}" id = "{{ $divID }}" >
2018-05-21 16:25:04 -04:00
{ { $ tb := printf "//i.ytimg.com/vi/%s/" $ id } }
< a href = "//youtube.com/watch?v={{ $id | safeHTMLAttr }}" target = "_blank" >
2018-05-21 11:34:21 -04:00
< img src = "{{ printf " % smaxresdefault . jpg " $tb }}" srcset = "{{ printf " % shqdefault . jpg " $tb }} 1x {{ printf " % smaxresdefault . jpg " $tb }} 2x" alt = "Video" >
< div class = "play" > < svg height = "100%" version = "1.1" viewBox = "0 0 68 48" width = "100%" > < path class = "ytp-large-play-button-bg" d = "{{ template " __h_simple_icon_play " $ }}" fill = "#212121" fill - opacity = "0.8" > < / path > < path d = "M 45,24 27,14 27,34" fill = "#fff" > < / path > < / svg > < / div > < / a > < / div > ` } ,
2018-05-04 11:53:56 -04:00
{ ` twitter_cards.html ` , ` { { - with $ . Params . images - } }
2018-01-29 05:44:41 -05:00
< meta name = "twitter:card" content = "summary_large_image" / >
2018-02-08 16:32:49 -05:00
< meta name = "twitter:image" content = "{{ index . 0 | absURL }}" / >
2018-01-29 05:44:41 -05:00
{ { else - } }
{ { - $ images := $ . Resources . ByType "image" - } }
{ { - $ featured := $ images . GetMatch "*feature*" - } }
{ { - $ featured := cond ( ne $ featured nil ) $ featured ( $ images . GetMatch "{*cover*,*thumbnail*}" ) - } }
{ { - with $ featured - } }
< meta name = "twitter:card" content = "summary_large_image" / >
2018-02-08 16:32:49 -05:00
< meta name = "twitter:image" content = "{{ $featured.Permalink }}" / >
2018-01-29 05:44:41 -05:00
{ { - else - } }
{ { - with $ . Site . Params . images - } }
2017-07-17 17:08:59 -04:00
< meta name = "twitter:card" content = "summary_large_image" / >
2018-02-08 16:32:49 -05:00
< meta name = "twitter:image" content = "{{ index . 0 | absURL }}" / >
2017-07-17 17:08:59 -04:00
{ { else - } }
< meta name = "twitter:card" content = "summary" / >
{ { - end - } }
2018-01-29 05:44:41 -05:00
{ { - end - } }
{ { - end } }
2014-12-09 13:33:55 -05:00
< meta name = "twitter:title" content = "{{ .Title }}" / >
2017-07-17 17:08:59 -04:00
< meta name = "twitter:description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" / >
{ { with . Site . Social . twitter - } }
< meta name = "twitter:site" content = "@{{ . }}" / >
{ { end - } }
2014-12-09 13:33:55 -05:00
{ { range . Site . Authors } }
2017-07-17 17:08:59 -04:00
{ { with . twitter - } }
< meta name = "twitter:creator" content = "@{{ . }}" / >
{ { end - } }
2018-05-04 11:53:56 -04:00
{ { end - } } ` } ,
2014-04-09 17:45:34 -04:00
}