Skip to content
Snippets Groups Projects
Commit e02f3d5e authored by alexisben's avatar alexisben
Browse files

add peertube iframe

parent d74bcc57
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,12 @@
"urls" (slice "dailymotion.com" "dai.ly")
) }}
{{ $providers := slice $vimeo $youtube $dailymotion }}
{{ $peertube := (dict
"name" "peertube"
"urls" (slice "peertube.fr")
) }}
{{ $providers := slice $vimeo $youtube $dailymotion $peertube }}
{{ range $provider := $providers }}
{{ range $provider_url := $provider.urls }}
......@@ -41,6 +46,9 @@
{{ $parts := split $url "video/" }}
{{ $identifier = (index (last 1 $parts) 0) }}
{{ end }}
{{ else if eq $provider.name "peertube" }}
{{ $parts := split $url "w/" }}
{{ $identifier = (index (last 1 $parts) 0) }}
{{ end }}
{{ if $identifier }}
......
<iframe
class="peertube"
src="https://peertube.fr/videos/embed/{{ .id }}"
title="{{ .title }}"
loading="lazy">
</iframe>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment