Peertube shortcode #134

Merged
omarl merged 3 commits from omarl/bglug.it:peertube-shortcode into main 2024-07-22 16:59:26 +00:00
3 changed files with 18 additions and 3 deletions

View File

@ -18,7 +18,7 @@ image_alt: Logo Ansible
**Francesco Vigotti**, creatore e gestore di [histats.com](https://www.histats.com) e ...uno che la sa lunga 😉, ci parla delle più recenti tecnologie **opensource** per gestire server: DevOps e Ansible.
{{< youtube ld5UTbOnIc0 >}}
PS:
[Guarda le slide dell'intervento](Ansible-talk-linuxday.pdf)
[Guarda le slide dell'intervento](Ansible-talk-linuxday.pdf) o il video su [Peertube](https://video.linux.it/w/p/3SUuYCXJqC2M7V35fu7ifX)
paspo marked this conversation as resolved Outdated
Outdated
Review
il link dovrebbe essere: https://video.linux.it/w/p/3SUuYCXJqC2M7V35fu7ifX
Outdated
Review

Sì, probabilmente ho copiato il link con l'account peertube aperto. Per trovare l'ID del video da mettere nello shortcode invece bisogna aprirlo non dalla playlist ma dall'elenco video https://video.linux.it/c/bglug.it/videos

Sì, probabilmente ho copiato il link con l'account peertube aperto. Per trovare l'ID del video da mettere nello shortcode invece bisogna aprirlo non dalla playlist ma dall'elenco video https://video.linux.it/c/bglug.it/videos
Outdated
Review

pensavo il link "originale" portasse alla playlist...

effettivamente meglio puntare al video

pensavo il link "originale" portasse alla playlist... effettivamente meglio puntare al video
Outdated
Review
quindi questo: https://video.linux.it/w/dgpsKn9vD98NnxNNWGXFzs
Outdated
Review

Sì però ho messo di proposito il link alla playlist, così per mostrare che ce ne sono anche altri.

Sì però ho messo di proposito il link alla playlist, così per mostrare che ce ne sono anche altri.
{{< peertube host="video.linux.it" id="dgpsKn9vD98NnxNNWGXFzs" title="1" >}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,15 @@
{{ if .IsNamedParams -}}
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
src="https://{{ .Get "host" }}/videos/embed/{{ .Get "id" }}?{{ with .Get "title" }}title={{ . }}{{ else }}title=0{{ end }}&{{ with .Get "warning" }}warningTitle={{ . }}{{ else }}warningTitle=0{{ end }}{{ with .Get "subtitle" }}&subtitle={{ . }}{{ end }}&peertubeLink=0" allowfullscreen>
</iframe>
</div>
{{- else -}}
<div style="position: relative; padding-bottom: 56.25%; margin-bottom: 1rem; height: 0; overflow: hidden;">
<iframe sandbox="allow-scripts allow-popups" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;"
src="https://{{ .Get 0 }}/videos/embed/{{ .Get 1 }}?title=0&warningTitle=0&peertubeLink=0" title="Peertube Video" allowfullscreen>
</iframe>
</div>
{{- end }}
<!-- https://github.com/bugsysop/hugo-peertube-shortcode -->