Skip to content
Snippets Groups Projects
Unverified Commit c0e225f5 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Merge pull request #141 from noesya/block-video/handle-peertube

Block video : handle peertube
parents 3542380f e02f3d5e
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