1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-18 22:15:32 -04:00

fix a few RSS validation warnings

This commit is contained in:
2020-07-20 12:44:21 -04:00
parent bc03922573
commit 17824d4c5c
33 changed files with 34 additions and 62 deletions

View File

@@ -22,7 +22,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{ . }}</author>{{ end }}
{{ with .Site.Author.email }}<author>{{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>
{{ .Content | html }}

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://codepen.io/{{ .Get "username" }}/pen/{{ .Get "id" }}" target="_blank" rel="noopener">Open this CodePen in a new window.</a></p>
<p><a href="https://codepen.io/{{ .Get "username" }}/pen/{{ .Get "id" }}" target="_blank" rel="noopener">Open this CodePen in a new window.</a></p>

View File

@@ -1,4 +1,4 @@
<div class="embed codepen">
<div class="embed {{ .Name }}">
<iframe
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?theme-id=light&amp;default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}"

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://codepen.io/{{ .Get "username" }}/pen/{{ .Get "id" }}" target="_blank" rel="noopener">Open this CodePen in a new window.</a></p>
<p><a href="https://codepen.io/{{ .Get "username" }}/pen/{{ .Get "id" }}" target="_blank" rel="noopener">Open this CodePen in a new window.</a></p>

View File

@@ -1,11 +1,4 @@
{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
{{- $json := getJSON $url -}}
<div class="embed facebook">
{{ $json.html | safeHTML }}
</div>
{{- define "__shortcode_facebook_js" }}
<div id="fb-root"></div>
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>
{{- end }}

View File

@@ -1,7 +1,7 @@
{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
{{- $json := getJSON $url -}}
<div class="embed facebook">
<div class="embed {{ .Name }}">
{{ $json.html | safeHTML }}
</div>

View File

@@ -1,11 +1,4 @@
{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
{{- $json := getJSON $url -}}
<div class="embed facebook">
{{ $json.html | safeHTML }}
</div>
{{- define "__shortcode_facebook_js" }}
<div id="fb-root"></div>
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>
{{- end }}

View File

@@ -1,4 +1 @@
<p style="text-align: center;">
<a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}">Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues">Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a>
</p>
<p><a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}">Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a> &mdash; <a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues">Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a></p>

View File

@@ -1,4 +1,4 @@
<div class="embed gh-buttons">
<div class="embed {{ .Name }}">
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Star</a>
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="true" aria-label="Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Issue</a>
</div>

View File

@@ -1,4 +1 @@
<p style="text-align: center;">
<a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}">Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues">Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a>
</p>
<p><a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}">Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a> &mdash; <a href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues">Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub</a></p>

View File

@@ -1 +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>
<p><a href="https://gist.github.com/{{ .Get "id" }}" target="_blank" rel="noopener">Open this GitHub Gist in a new window.</a></p>

View File

@@ -1,3 +1,3 @@
<div class="embed gist">
<div class="embed {{ .Name }}">
<script src="https://gist.github.com/{{ .Get "id" }}.js{{ with .Get "file" }}?file={{ . }}{{ end }}"></script>
</div>

View File

@@ -1 +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>
<p><a href="https://gist.github.com/{{ .Get "id" }}" target="_blank" rel="noopener">Open this GitHub Gist in a new window.</a></p>

View File

@@ -1,3 +1 @@
<div class="embed iframe">
<iframe src="{{ .Get "src" }}" {{ with .Get "title" }}title="{{ . }}"{{ end }}></iframe>
</div>
<p><a href="{{ .Get "src" }}" target="_blank" rel="noopener">Open frame in a new window.</a></p>

View File

@@ -1,3 +1,3 @@
<div class="embed iframe">
<div class="embed {{ .Name }}">
<iframe src="{{ .Get "src" }}" {{ with .Get "title" }}title="{{ . }}"{{ end }}></iframe>
</div>

View File

@@ -1,3 +1 @@
<div class="embed iframe">
<iframe src="{{ .Get "src" }}" {{ with .Get "title" }}title="{{ . }}"{{ end }}></iframe>
</div>
<p><a href="{{ .Get "src" }}" target="_blank" rel="noopener">Open frame in a new window.</a></p>

View File

@@ -1,6 +1,6 @@
{{- $optimized := partial "functions/optimize-image" . -}}
<p style="text-align: center;">
<p align="center">
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
{{- with .Get "alt" }} alt="{{ . | safeHTML }}" title="{{ . | safeHTML }}"{{ end }}

View File

@@ -11,7 +11,7 @@
<figcaption>{{ . | $.Page.RenderString | safeHTML }}</figcaption>
</figure>
{{- else -}}
{{- else }}
<p class="image">
{{ with .Get "link" }}<a class="no-underline" href="{{ . }}"{{ if strings.HasPrefix . "http" }} target="_blank" rel="noopener"{{ end }}>{{ end }}
<img src="{{ $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"

View File

@@ -1,6 +1,6 @@
{{- $optimized := partial "functions/optimize-image" . -}}
<p style="text-align: center;">
<p align="center">
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
<img src="{{ $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
{{- with .Get "alt" }} alt="{{ . | safeHTML }}" title="{{ . | safeHTML }}"{{ end }}

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://www.instagram.com/p/{{ .Get "id" }}" target="_blank" rel="noopener">View this image on Instagram.</a></p>
<p><a href="https://www.instagram.com/p/{{ .Get "id" }}" target="_blank" rel="noopener">View this image on Instagram.</a></p>

View File

@@ -1,7 +1,7 @@
{{- $url := printf "https://api.instagram.com/oembed/?omitscript=1&url=https://www.instagram.com/p/%s" (.Get "id") -}}
{{- $json := getJSON $url -}}
<div class="embed instagram">
<div class="embed {{ .Name }}">
{{ $json.html | safeHTML }}
</div>

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://www.instagram.com/p/{{ .Get "id" }}" target="_blank" rel="noopener">View this image on Instagram.</a></p>
<p><a href="https://www.instagram.com/p/{{ .Get "id" }}" target="_blank" rel="noopener">View this image on Instagram.</a></p>

View File

@@ -1,6 +1,4 @@
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
{{- $json := getJSON $url -}}
<div class="embed tweet">
{{ $json.html | safeHTML }}
</div>

View File

@@ -1,7 +1,7 @@
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
{{- $json := getJSON $url -}}
<div class="embed tweet">
<div class="embed {{ .Name }}">
{{ $json.html | safeHTML }}
</div>

View File

@@ -1,6 +1,4 @@
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
{{- $json := getJSON $url -}}
<div class="embed tweet">
{{ $json.html | safeHTML }}
</div>

View File

@@ -1,4 +1,4 @@
<div class="embed video">
<div class="embed {{ .Name }}">
<video {{- with .Get "width" }} width="{{ . }}"{{ end }}
{{- with .Get "height" }} height="{{ . }}"{{ end }}
{{- with .Page.Resources.GetMatch (.Get "poster") }} poster="{{ .Permalink }}"{{ end }}

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://vimeo.com/{{ .Get "id" }}" target="_blank" rel="noopener">Watch this video on Vimeo.</a></p>
<p><a href="https://vimeo.com/{{ .Get "id" }}" target="_blank" rel="noopener">Watch this video on Vimeo.</a></p>

View File

@@ -1,4 +1,4 @@
<div class="embed vimeo" style="padding:75% 0 0 0;position:relative;">
<div class="embed {{ .Name }}" style="padding:75% 0 0 0;position:relative;">
<iframe src="https://player.vimeo.com/video/{{ .Get "id" }}&amp;dnt=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="fullscreen" allowfullscreen></iframe>
</div>

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://vimeo.com/{{ .Get "id" }}" target="_blank" rel="noopener">Watch this video on Vimeo.</a></p>
<p><a href="https://vimeo.com/{{ .Get "id" }}" target="_blank" rel="noopener">Watch this video on Vimeo.</a></p>

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://www.youtube.com/watch?v={{ index .Params 0 }}" target="_blank" rel="noopener">Watch this video on YouTube.</a></p>
<p><a href="https://www.youtube.com/watch?v={{ index .Params 0 }}" target="_blank" rel="noopener">Watch this video on YouTube.</a></p>

View File

@@ -1,4 +1,4 @@
<div class="embed youtube">
<div class="embed {{ .Name }}">
<iframe
class="youtube-player"
src="https://www.youtube-nocookie.com/embed/{{ index .Params 0 }}?autoplay=0&amp;hl=en&amp;fs=1&amp;showinfo=1&amp;rel=0&amp;iv_load_policy=3"

View File

@@ -1 +1 @@
<p style="text-align: center;"><a href="https://www.youtube.com/watch?v={{ index .Params 0 }}" target="_blank" rel="noopener">Watch this video on YouTube.</a></p>
<p><a href="https://www.youtube.com/watch?v={{ index .Params 0 }}" target="_blank" rel="noopener">Watch this video on YouTube.</a></p>