summaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/posts/recent.html6
-rw-r--r--layouts/shortcodes/shows/recent_episodes.html6
-rw-r--r--layouts/shortcodes/youtube/playlist_url.html1
3 files changed, 13 insertions, 0 deletions
diff --git a/layouts/shortcodes/posts/recent.html b/layouts/shortcodes/posts/recent.html
new file mode 100644
index 0000000..f4b28ca
--- /dev/null
+++ b/layouts/shortcodes/posts/recent.html
@@ -0,0 +1,6 @@
+<ul>
+ {{ range first 5 (where .Site.RegularPages "Section" "posts") }}
+ <li>{{ .Date.Format "2006-01-02" }} - <a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+</ul>
+
diff --git a/layouts/shortcodes/shows/recent_episodes.html b/layouts/shortcodes/shows/recent_episodes.html
new file mode 100644
index 0000000..fc01a57
--- /dev/null
+++ b/layouts/shortcodes/shows/recent_episodes.html
@@ -0,0 +1,6 @@
+<ul>
+ {{ range first 5 (where (where .Site.RegularPages "Section" "shows") ".Parent.Title" (.Get 0)) }}
+ <li>{{ .Date.Format "2006-01-01" }} - {{ .Title }}. <a href="https://www.youtube.com/watch?v={{ .Params.VideoId }}">Video</a> | <a href="{{ .RelPermalink }}">Post</a></li>
+ {{ end }}
+</ul>
+
diff --git a/layouts/shortcodes/youtube/playlist_url.html b/layouts/shortcodes/youtube/playlist_url.html
new file mode 100644
index 0000000..cfdcf05
--- /dev/null
+++ b/layouts/shortcodes/youtube/playlist_url.html
@@ -0,0 +1 @@
+https://www.youtube.com/playlist?list={{ .Get 0 }}