github.com/shohhei1126/hugo@v0.42.2-0.20180623210752-3d5928889ad7/tpl/tplimpl/embedded/templates.autogen.go (about)

     1  // Copyright 2018 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  // This file is autogenerated.
    15  
    16  // Package embedded defines the internal templates that Hugo provides.
    17  package embedded
    18  
    19  var EmbeddedTemplates = [][2]string{
    20  	{`_default/robots.txt`, `User-agent: *`},
    21  	{`_default/rss.xml`, `<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    22    <channel>
    23      <title>{{ if eq  .Title  .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
    24      <link>{{ .Permalink }}</link>
    25      <description>Recent content {{ if ne  .Title  .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
    26      <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
    27      <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
    28      <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
    29      <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
    30      <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
    31      <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
    32      {{ with .OutputFormats.Get "RSS" }}
    33  	{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
    34      {{ end }}
    35      {{ range .Data.Pages }}
    36      <item>
    37        <title>{{ .Title }}</title>
    38        <link>{{ .Permalink }}</link>
    39        <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
    40        {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
    41        <guid>{{ .Permalink }}</guid>
    42        <description>{{ .Summary | html }}</description>
    43      </item>
    44      {{ end }}
    45    </channel>
    46  </rss>`},
    47  	{`_default/sitemap.xml`, `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
    48    xmlns:xhtml="http://www.w3.org/1999/xhtml">
    49    {{ range .Data.Pages }}
    50    <url>
    51      <loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
    52      <lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
    53      <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
    54      <priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
    55      <xhtml:link
    56                  rel="alternate"
    57                  hreflang="{{ .Lang }}"
    58                  href="{{ .Permalink }}"
    59                  />{{ end }}
    60      <xhtml:link
    61                  rel="alternate"
    62                  hreflang="{{ .Lang }}"
    63                  href="{{ .Permalink }}"
    64                  />{{ end }}
    65    </url>
    66    {{ end }}
    67  </urlset>`},
    68  	{`_default/sitemapindex.xml`, `<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    69  	{{ range . }}
    70  	<sitemap>
    71  	   	<loc>{{ .SitemapAbsURL }}</loc>
    72  		{{ if not .LastChange.IsZero }}
    73  	   	<lastmod>{{ .LastChange.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>
    74  		{{ end }}
    75  	</sitemap>
    76  	{{ end }}
    77  </sitemapindex>
    78  `},
    79  	{`disqus.html`, `{{- $pc := .Page.Site.Config.Privacy.Disqus -}}
    80  {{- if not $pc.Disable -}}
    81  {{ if .Site.DisqusShortname }}<div id="disqus_thread"></div>
    82  <script>
    83      var disqus_config = function () {
    84      {{with .GetParam "disqus_identifier" }}this.page.identifier = '{{ . }}';{{end}}
    85      {{with .GetParam "disqus_title" }}this.page.title = '{{ . }}';{{end}}
    86      {{with .GetParam "disqus_url" }}this.page.url = '{{ . | html  }}';{{end}}
    87      };
    88      (function() {
    89          if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) {
    90              document.getElementById('disqus_thread').innerHTML = 'Disqus comments not available by default when the website is previewed locally.';
    91              return;
    92          }
    93          var d = document, s = d.createElement('script'); s.async = true;
    94          s.src = '//' + {{ .Site.DisqusShortname }} + '.disqus.com/embed.js';
    95          s.setAttribute('data-timestamp', +new Date());
    96          (d.head || d.body).appendChild(s);
    97      })();
    98  </script>
    99  <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
   100  <a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>{{end}}
   101  {{- end -}}`},
   102  	{`google_analytics.html`, `{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
   103  {{- if not $pc.Disable -}}
   104  {{ with .Site.GoogleAnalytics }}
   105  <script>
   106  {{ template "__ga_js_set_doNotTrack" $ }}
   107  if (!doNotTrack) {
   108  	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
   109  	(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   110  	m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
   111  	})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
   112  	{{- if $pc.UseSessionStorage }}
   113  	if (window.sessionStorage) {
   114  		var GA_SESSION_STORAGE_KEY = 'ga:clientId';
   115  		ga('create', '{{ . }}', {
   116  	    'storage': 'none',
   117  	    'clientId': sessionStorage.getItem(GA_SESSION_STORAGE_KEY)
   118  	   });
   119  	   ga(function(tracker) {
   120  	    sessionStorage.setItem(GA_SESSION_STORAGE_KEY, tracker.get('clientId'));
   121  	   });
   122     }
   123  	{{ else }}
   124  	ga('create', '{{ . }}', 'auto');
   125  	{{ end -}}
   126  	{{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end }}
   127  	ga('send', 'pageview');
   128  }
   129  </script>
   130  {{ end }}
   131  {{- end -}}
   132  {{- define "__ga_js_set_doNotTrack" -}}{{/* This is also used in the async version. */}}
   133  {{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
   134  {{- if not $pc.RespectDoNotTrack -}}
   135  var doNotTrack = false;
   136  {{- else -}}
   137  var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
   138  var doNotTrack = (dnt == "1" || dnt == "yes");
   139  {{- end -}}
   140  {{- end -}}`},
   141  	{`google_analytics_async.html`, `{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
   142  {{- if not $pc.Disable -}}
   143  {{ with .Site.GoogleAnalytics }}
   144  <script>
   145  {{ template "__ga_js_set_doNotTrack" $ }}
   146  if (!doNotTrack) {
   147  	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
   148  	{{- if $pc.UseSessionStorage }}
   149  	if (window.sessionStorage) {
   150  		var GA_SESSION_STORAGE_KEY = 'ga:clientId';
   151  		ga('create', '{{ . }}', {
   152  	    'storage': 'none',
   153  	    'clientId': sessionStorage.getItem(GA_SESSION_STORAGE_KEY)
   154  	   });
   155  	   ga(function(tracker) {
   156  	    sessionStorage.setItem(GA_SESSION_STORAGE_KEY, tracker.get('clientId'));
   157  	   });
   158     }
   159  	{{ else }}
   160  	ga('create', '{{ . }}', 'auto');
   161  	{{ end -}}
   162  	{{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end }}
   163  	ga('send', 'pageview');
   164  }
   165  </script>
   166  <script async src='https://www.google-analytics.com/analytics.js'></script>
   167  {{ end }}
   168  {{- end -}}`},
   169  	{`google_news.html`, `{{ if .IsPage }}{{ with .Params.news_keywords }}
   170    <meta name="news_keywords" content="{{ range $i, $kw := first 10 . }}{{ if $i }},{{ end }}{{ $kw }}{{ end }}" />
   171  {{ end }}{{ end }}`},
   172  	{`opengraph.html`, `<meta property="og:title" content="{{ .Title }}" />
   173  <meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
   174  <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
   175  <meta property="og:url" content="{{ .Permalink }}" />
   176  {{ with .Params.images }}{{ range first 6 . }}
   177    <meta property="og:image" content="{{ . | absURL }}" />
   178  {{ end }}{{ end }}
   179  
   180  {{ if .IsPage }}
   181  {{ if not .PublishDate.IsZero }}<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>
   182  {{ else if not .Date.IsZero }}<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
   183  {{ if not .Lastmod.IsZero }}<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
   184  {{ else }}
   185  {{ if not .Date.IsZero }}<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}"/>{{ end }}
   186  {{ end }}{{ with .Params.audio }}
   187  <meta property="og:audio" content="{{ . }}" />{{ end }}{{ with .Params.locale }}
   188  <meta property="og:locale" content="{{ . }}" />{{ end }}{{ with .Site.Params.title }}
   189  <meta property="og:site_name" content="{{ . }}" />{{ end }}{{ with .Params.videos }}
   190  {{ range . }}
   191    <meta property="og:video" content="{{ . | absURL }}" />
   192  {{ end }}{{ end }}
   193  
   194  <!-- If it is part of a series, link to related articles -->
   195  {{ $permalink := .Permalink }}
   196  {{ $siteSeries := .Site.Taxonomies.series }}{{ with .Params.series }}
   197  {{ range $name := . }}
   198    {{ $series := index $siteSeries $name }}
   199    {{ range $page := first 6 $series.Pages }}
   200      {{ if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
   201    {{ end }}
   202  {{ end }}{{ end }}
   203  
   204  {{ if .IsPage }}
   205  {{ range .Site.Authors }}{{ with .Social.facebook }}
   206  <meta property="article:author" content="https://www.facebook.com/{{ . }}" />{{ end }}{{ with .Site.Social.facebook }}
   207  <meta property="article:publisher" content="https://www.facebook.com/{{ . }}" />{{ end }}
   208  <meta property="article:section" content="{{ .Section }}" />
   209  {{ with .Params.tags }}{{ range first 6 . }}
   210    <meta property="article:tag" content="{{ . }}" />{{ end }}{{ end }}
   211  {{ end }}{{ end }}
   212  
   213  <!-- Facebook Page Admin ID for Domain Insights -->
   214  {{ with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}`},
   215  	{`pagination.html`, `{{ $pag := $.Paginator }}
   216  {{ if gt $pag.TotalPages 1 }}
   217  <ul class="pagination">
   218      {{ with $pag.First }}
   219      <li>
   220          <a href="{{ .URL }}" aria-label="First"><span aria-hidden="true">&laquo;&laquo;</span></a>
   221      </li>
   222      {{ end }}
   223      <li
   224      {{ if not $pag.HasPrev }}class="disabled"{{ end }}>
   225      <a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ end }}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
   226      </li>
   227      {{ $.Scratch.Set "__paginator.ellipsed" false }}
   228      {{ range $pag.Pagers }}
   229      {{ $right := sub .TotalPages .PageNumber }}
   230      {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }}
   231      {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $pag.PageNumber 2)) (lt .PageNumber (add $pag.PageNumber 2)))  }}
   232      {{ if $showNumber }}
   233          {{ $.Scratch.Set "__paginator.ellipsed" false }}
   234          {{ $.Scratch.Set "__paginator.shouldEllipse" false }}
   235      {{ else }}
   236          {{ $.Scratch.Set "__paginator.shouldEllipse" (not ($.Scratch.Get "__paginator.ellipsed") ) }}
   237          {{ $.Scratch.Set "__paginator.ellipsed" true }}
   238      {{ end }}
   239      {{ if $showNumber }}
   240      <li
   241      {{ if eq . $pag }}class="active"{{ end }}><a href="{{ .URL }}">{{ .PageNumber }}</a></li>
   242      {{ else if ($.Scratch.Get "__paginator.shouldEllipse") }}
   243      <li class="disabled"><span aria-hidden="true">&hellip;</span></li>
   244      {{ end }}
   245      {{ end }}
   246      <li
   247      {{ if not $pag.HasNext }}class="disabled"{{ end }}>
   248      <a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ end }}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a>
   249      </li>
   250      {{ with $pag.Last }}
   251      <li>
   252          <a href="{{ .URL }}" aria-label="Last"><span aria-hidden="true">&raquo;&raquo;</span></a>
   253      </li>
   254      {{ end }}
   255  </ul>
   256  {{ end }}`},
   257  	{`schema.html`, `{{ with .Site.Social.GooglePlus }}<link rel="publisher" href="{{ . }}"/>{{ end }}
   258  <meta itemprop="name" content="{{ .Title }}">
   259  <meta itemprop="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
   260  
   261  {{if .IsPage}}{{ $ISO8601 := "2006-01-02T15:04:05-07:00" }}{{ if not .PublishDate.IsZero }}
   262  <meta itemprop="datePublished" content="{{ .PublishDate.Format $ISO8601 | safeHTML }}" />{{ end }}
   263  {{ if not .Date.IsZero }}<meta itemprop="dateModified" content="{{ .Date.Format $ISO8601 | safeHTML }}" />{{ end }}
   264  <meta itemprop="wordCount" content="{{ .WordCount }}">
   265  {{ with .Params.images }}{{ range first 6 . }}
   266    <meta itemprop="image" content="{{ . | absURL }}">
   267  {{ end }}{{ end }}
   268  
   269  <!-- Output all taxonomies as schema.org keywords -->
   270  <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 }}" />
   271  {{ end }}`},
   272  	{`shortcodes/__h_simple_assets.html`, `{{ define "__h_simple_css" }}{{/* These template definitions are global. */}}
   273  {{- if not (.Page.Scratch.Get "__h_simple_css") -}}
   274  {{/* Only include once */}}
   275  {{-  .Page.Scratch.Set "__h_simple_css" true -}}
   276  <style>
   277  .__h_video {
   278     position: relative;
   279     padding-bottom: 56.23%;
   280     height: 0;
   281     overflow: hidden;
   282     width: 100%;
   283     background: #000;
   284  }
   285  .__h_video img {
   286     width: 100%;
   287     height: auto;
   288     color: #000;
   289  }
   290  .__h_video .play {
   291     height: 72px;
   292     width: 72px;
   293     left: 50%;
   294     top: 50%;
   295     margin-left: -36px;
   296     margin-top: -36px;
   297     position: absolute;
   298     cursor: pointer;
   299  }
   300  </style>
   301  {{- end -}}
   302  {{- end -}}
   303  {{- define "__h_simple_icon_play" -}}
   304  <svg version="1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 61 61"><circle cx="30.5" cy="30.5" r="30.5" opacity=".8" fill="#000"></circle><path d="M25.3 19.2c-2.1-1.2-3.8-.2-3.8 2.2v18.1c0 2.4 1.7 3.4 3.8 2.2l16.6-9.1c2.1-1.2 2.1-3.2 0-4.4l-16.6-9z" fill="#fff"></path></svg>
   305  {{- end -}}
   306  `},
   307  	{`shortcodes/figure.html`, `<!-- image -->
   308  <figure{{ with .Get "class" }} class="{{.}}"{{ end }}>
   309      {{ if .Get "link"}}<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>{{ end }}
   310          <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 }}/>
   311      {{ if .Get "link"}}</a>{{ end }}
   312      {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
   313      <figcaption>{{ if isset .Params "title" }}
   314          <h4>{{ .Get "title" }}</h4>{{ end }}
   315          {{ if or (.Get "caption") (.Get "attr")}}<p>
   316          {{ .Get "caption" }}
   317          {{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
   318              {{ .Get "attr" }}
   319          {{ if .Get "attrlink"}}</a> {{ end }}
   320          </p> {{ end }}
   321      </figcaption>
   322      {{ end }}
   323  </figure>
   324  <!-- image -->`},
   325  	{`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>`},
   326  	{`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 }}`},
   327  	{`shortcodes/instagram.html`, `{{- $pc := .Page.Site.Config.Privacy.Instagram -}}
   328  {{- if not $pc.Disable -}}
   329  {{- if $pc.Simple -}}
   330  {{ template "_internal/shortcodes/instagram_simple.html" . }}
   331  {{- else -}}
   332  {{ $id := .Get 0 }}
   333  {{ $hideCaption := cond (eq (.Get 1) "hidecaption") "1" "0" }}
   334  {{ with getJSON "https://api.instagram.com/oembed/?url=https://instagram.com/p/" $id "/&hidecaption=" $hideCaption  }}{{ .html | safeHTML }}{{ end }}
   335  {{- end -}}
   336  {{- end -}}`},
   337  	{`shortcodes/instagram_simple.html`, `{{- $pc := .Page.Site.Config.Privacy.Instagram -}}
   338  {{- $sc := .Page.Site.Config.Services.Instagram -}}
   339  {{- if not $pc.Disable -}}
   340  {{- $id := .Get 0 -}}
   341  {{- $item := getJSON "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/" $id "/&amp;maxwidth=640&amp;omitscript=true" -}}
   342  {{- $class1 := "__h_instagram" -}}
   343  {{- $class2 := "s_instagram_simple" -}}
   344  {{- $hideCaption := (eq (.Get 1) "hidecaption") -}}
   345  {{ with $item }}
   346  {{- $mediaURL := printf "https://instagram.com/p/%s/" $id | safeURL -}}
   347  {{- if not $sc.DisableInlineCSS -}}
   348  {{ template "__h_simple_instagram_css" $ }}
   349  {{- end -}}
   350  <div class="{{ $class1 }} {{ $class2 }} card" style="max-width: {{ $item.thumbnail_width }}px">
   351  	<div class="card-header">
   352      <a href="{{ $item.author_url | safeURL }}" class="card-link">{{ $item.author_name }}</a>
   353    </div>
   354  	<a href="{{ $mediaURL }}" target="_blank"><img class="card-img-top img-fluid" src="{{ $item.thumbnail_url }}" width="{{ $item.thumbnail_width }}"  height="{{ $item.thumbnail_height }}" alt="Instagram Image"></a>
   355  	<div class="card-body">
   356  		{{ if not $hideCaption }}<p class="card-text"><a href="{{ $item.author_url | safeURL }}" class="card-link">{{ $item.author_name }}</a> {{ $item.title}}</p>{{ end }}
   357  		<a href="{{ $item.author_url | safeURL }}" class="card-link">View More on Instagram</a>
   358  	</div>
   359  </div>
   360  {{ end }}
   361  {{- end -}}
   362  
   363  {{ define "__h_simple_instagram_css" }}
   364  {{ if not (.Page.Scratch.Get "__h_simple_instagram_css") }}
   365  {{/* Only include once */}}
   366  {{  .Page.Scratch.Set "__h_simple_instagram_css" true }}
   367  <style type="text/css">
   368     .__h_instagram.card {
   369        font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
   370        font-size: 14px;
   371        border: 1px solid rgb(219, 219, 219);
   372        padding: 0;
   373  	  margin-top: 30px;
   374     }
   375     .__h_instagram.card .card-header, .__h_instagram.card .card-body {
   376        padding: 10px 10px 10px;
   377     }
   378     .__h_instagram.card img {
   379        width: 100%;
   380      	height: auto;
   381     }
   382  </style>
   383  {{ end }}
   384  {{ end }}`},
   385  	{`shortcodes/ref.html`, `{{ if len .Params | eq 2 }}{{ ref .Page (.Get 0) (.Get 1) }}{{ else }}{{ ref .Page (.Get 0) }}{{ end }}`},
   386  	{`shortcodes/relref.html`, `{{ if len .Params | eq 2 }}{{ relref .Page (.Get 0) (.Get 1) }}{{ else }}{{ relref .Page (.Get 0) }}{{ end }}`},
   387  	{`shortcodes/twitter.html`, `{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
   388  {{- if not $pc.Disable -}}
   389  {{- if $pc.Simple -}}
   390  {{ template "_internal/shortcodes/twitter_simple.html" . }}
   391  {{- else -}}
   392  {{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%s&dnt=%t" (index .Params 0) $pc.EnableDNT -}}
   393  {{- $json := getJSON $url -}}
   394  {{ $json.html | safeHTML }}
   395  {{- end -}}
   396  {{- end -}}`},
   397  	{`shortcodes/twitter_simple.html`, `{{- $pc := .Page.Site.Config.Privacy.Twitter -}}
   398  {{- $sc := .Page.Site.Config.Services.Twitter -}}
   399  {{- if not $pc.Disable -}}
   400  {{- $id := .Get 0 -}}
   401  {{- $json := getJSON "https://api.twitter.com/1/statuses/oembed.json?id=" $id "&omit_script=true" -}}
   402  {{- if not $sc.DisableInlineCSS -}}
   403  {{ template "__h_simple_twitter_css" $ }}
   404  {{- end -}}
   405  {{ $json.html | safeHTML }}
   406  {{- end -}}
   407  
   408  {{ define "__h_simple_twitter_css" }}
   409  {{ if not (.Page.Scratch.Get "__h_simple_twitter_css") }}
   410  {{/* Only include once */}}
   411  {{  .Page.Scratch.Set "__h_simple_twitter_css" true }}
   412  <style type="text/css">
   413    .twitter-tweet {
   414    font: 14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
   415    border-left: 4px solid #2b7bb9;
   416    padding-left: 1.5em;
   417    color: #555;
   418  }
   419    .twitter-tweet a {
   420    color: #2b7bb9;
   421    text-decoration: none;
   422  }
   423    blockquote.twitter-tweet a:hover,
   424    blockquote.twitter-tweet a:focus {
   425    text-decoration: underline;
   426  }
   427  </style>
   428  {{ end }}
   429  {{ end }}`},
   430  	{`shortcodes/vimeo.html`, `{{- $pc := .Page.Site.Config.Privacy.Vimeo -}}
   431  {{- if not $pc.Disable -}}
   432  {{- if $pc.Simple -}}
   433  {{ template "_internal/shortcodes/vimeo_simple.html" . }}
   434  {{- else -}}
   435  {{ if .IsNamedParams }}<div {{ if .Get "class" }}class="{{ .Get "class" }}"{{ else }}style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
   436    <iframe src="//player.vimeo.com/video/{{ .Get "id" }}" {{ if not (.Get "class") }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" {{ end }}webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
   437   </div>{{ else }}
   438  <div {{ if len .Params | eq 2 }}class="{{ .Get 1 }}"{{ else }}style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
   439    <iframe src="//player.vimeo.com/video/{{ .Get 0 }}" {{ if len .Params | eq 1 }}style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" {{ end }}webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
   440   </div>
   441  {{ end }}
   442  {{- end -}}
   443  {{- end -}}`},
   444  	{`shortcodes/vimeo_simple.html`, `{{ $id := .Get "id" | default (.Get 0) }}
   445  {{- $item := getJSON "https://vimeo.com/api/oembed.json?url=https://vimeo.com/" $id -}}
   446  {{ $class := .Get "class" | default (.Get 1) }}
   447  {{ $hasClass := $class }}
   448  {{ $class := $class | default "__h_video" }}
   449  {{ if not $hasClass }}
   450  {{/* If class is set, assume the user wants to provide his own styles. */}}
   451  {{ template "__h_simple_css" $ }}
   452  {{ end }}
   453  {{ $secondClass := "s_video_simple" }}
   454  <div class="{{ $secondClass }} {{ $class }}">
   455  {{- with $item }}
   456  <a href="{{ .provider_url }}{{ .video_id | safeHTMLAttr }}" target="_blank">
   457  {{ $thumb := .thumbnail_url }}
   458  {{ $original := $thumb | replaceRE "(_.*\\.)" "." }}
   459  <img src="{{ $thumb }}" srcset="{{ $thumb }} 1x, {{ $original }} 2x" alt="{{ .title }}">
   460  <div class="play">{{ template "__h_simple_icon_play" $ }}</div></a></div>
   461  {{- end -}}
   462  `},
   463  	{`shortcodes/youtube.html`, `{{- $pc := .Page.Site.Config.Privacy.YouTube -}}
   464  {{- if not $pc.Disable -}}
   465  {{- $ytHost := cond $pc.PrivacyEnhanced  "www.youtube-nocookie.com" "www.youtube.com" -}}
   466  {{- $id := .Get "id" | default (.Get 0) -}}
   467  {{- $class := .Get "class" | default (.Get 1) }}
   468  <div {{ with $class }}class="{{ . }}"{{ else }}style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"{{ end }}>
   469    <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%; border:0;" {{ end }}allowfullscreen title="YouTube Video"></iframe>
   470  </div>
   471  {{ end -}}
   472  `},
   473  	{`twitter_cards.html`, `{{- with $.Params.images -}}
   474  <meta name="twitter:card" content="summary_large_image"/>
   475  <meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
   476  {{ else -}}
   477  {{- $images := $.Resources.ByType "image" -}}
   478  {{- $featured := $images.GetMatch "*feature*" -}}
   479  {{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}}
   480  {{- with $featured -}}
   481  <meta name="twitter:card" content="summary_large_image"/>
   482  <meta name="twitter:image" content="{{ $featured.Permalink }}"/>
   483  {{- else -}}
   484  {{- with $.Site.Params.images -}}
   485  <meta name="twitter:card" content="summary_large_image"/>
   486  <meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
   487  {{ else -}}
   488  <meta name="twitter:card" content="summary"/>
   489  {{- end -}}
   490  {{- end -}}
   491  {{- end }}
   492  <meta name="twitter:title" content="{{ .Title }}"/>
   493  <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
   494  {{ with .Site.Social.twitter -}}
   495  <meta name="twitter:site" content="@{{ . }}"/>
   496  {{ end -}}
   497  {{ range .Site.Authors }}
   498  {{ with .twitter -}}
   499  <meta name="twitter:creator" content="@{{ . }}"/>
   500  {{ end -}}
   501  {{ end -}}`},
   502  }