mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 03:15:30 -04:00
better gist shortcode w/ AMP and RSS versions
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
|
||||
<script async custom-element="amp-twitter" src="https://cdn.ampproject.org/v0/amp-twitter-0.1.js"></script>
|
||||
<script async custom-element="amp-facebook" src="https://cdn.ampproject.org/v0/amp-facebook-0.1.js"></script>
|
||||
<script async custom-element="amp-gist" src="https://cdn.ampproject.org/v0/amp-gist-0.1.js"></script>
|
||||
<title>{{ .Title }} – {{ .Site.Title }}</title>
|
||||
{{ with .OutputFormats.Get "html" }}<link rel="canonical" href="{{ .Permalink }}">{{ end }}
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
|
6
layouts/shortcodes/gist.amp.html
Normal file
6
layouts/shortcodes/gist.amp.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<amp-gist
|
||||
data-gistid="{{ .Get "id" }}"
|
||||
{{ with .Get "file" }}data-file="{{ . }}"{{ end }}
|
||||
layout="fixed-height"
|
||||
height="500">
|
||||
</amp-gist>
|
1
layouts/shortcodes/gist.html
Normal file
1
layouts/shortcodes/gist.html
Normal file
@@ -0,0 +1 @@
|
||||
<script src="https://gist.github.com/{{ .Get "id" }}.js{{ with .Get "file" }}?file={{ . }}{{ end }}"></script>
|
1
layouts/shortcodes/gist.rss.xml
Normal file
1
layouts/shortcodes/gist.rss.xml
Normal file
@@ -0,0 +1 @@
|
||||
<p style="text-align: center;"><a href="https://gist.github.com/{{ .Get "id" }}" target="_blank" rel="noopener">Open this GitHub Gist in a new window.</a></p>
|
Reference in New Issue
Block a user