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

fix peertube url domain

parent c0e225f5
No related branches found
No related tags found
No related merge requests found
{{ $url := .url }}
{{ $identifier := false }}
{{ $title := partial "PrepareHTML" .title }}
{{ $domain := "" }}
{{ $vimeo := (dict
"name" "vimeo"
......@@ -19,7 +20,7 @@
{{ $peertube := (dict
"name" "peertube"
"urls" (slice "peertube.fr")
"urls" (slice "peertube")
) }}
{{ $providers := slice $vimeo $youtube $dailymotion $peertube }}
......@@ -49,6 +50,7 @@
{{ else if eq $provider.name "peertube" }}
{{ $parts := split $url "w/" }}
{{ $identifier = (index (last 1 $parts) 0) }}
{{ $domain = (index (first 1 $parts) 0)}}
{{ end }}
{{ if $identifier }}
......@@ -56,6 +58,7 @@
{{ partial $partial (dict
"id" $identifier
"title" $title
"domain" $domain
)}}
{{ end }}
{{ end }}
......
<iframe
class="peertube"
src="https://peertube.fr/videos/embed/{{ .id }}"
src="{{ .domain }}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