You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: control footer URL via shortcode url param (#64) (#67)
The persistent footer's source label is upgraded from plain text to a
clickable link. A new url shortcode parameter on podcast-player
controls the link: an explicit URL overrides the auto-derived link,
"none" hides the link, and omitting it auto-derives the link from the
audio src by stripping the filename. The same attribute can be set on
the top-level <podcast-footer url="..."> to override what the inline
player sends. URLs are sanitized at build time
(http/https/relative/fragment/dot-relative, plus "none") and at
runtime (http/https only).
Co-authored-by: Adur <adurrr@users.noreply.github.com>
Copy file name to clipboardExpand all lines: exampleSite/content/docs/getting-started.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ After installing Wavecast, add a podcast player to any page with a single shortc
44
44
|-----------|----------|---------|-------------|
45
45
|`src`|**yes**|: | Audio URL or local file path |
46
46
|`title`| no |`""`| Episode title in the player header |
47
+
|`url`| no |`""`| Link target for the footer source label. Set to a URL (http/https or site-relative) to make the label clickable, or `"none"` to hide the link. Omit to auto-derive from the audio source. |
Copy file name to clipboardExpand all lines: exampleSite/content/docs/homepage-setup.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,30 @@ title automatically scrolls horizontally so the full text is visible. Short
123
123
titles render normally with no animation. The behavior respects
124
124
`prefers-reduced-motion: reduce`, which falls back to ellipsis truncation.
125
125
126
+
## Linking the Footer
127
+
128
+
The persistent footer shows asmallsourcelabel (the audio host's domain) below the episode title. By default this label is alink to the audio file's parent directory. The `url` shortcode parameter overrides or hides the link:
129
+
130
+
- Omitted, auto-derived: the link points at the audio file's parent directory (e.g. `src="https://example.com/episodes/foo.mp3"` makes the link `https://example.com/episodes/`).
131
+
- A URL: the link points at that URL instead. Accepts `http://`, `https://`, and site-relative paths starting with `/`, `#`, or `.`.
132
+
- `"none"`: the link is hidden entirely. Useful for live radio streams that have no episode page.
133
+
134
+
```go-html-template
135
+
{{</* podcast-player
136
+
src="https://example.com/stream.mp3"
137
+
title="Live Broadcast"
138
+
url="https://example.com/shows/live"
139
+
*/>}}
140
+
141
+
{{</* podcast-player
142
+
src="https://example.com/stream.mp3"
143
+
title="Live Broadcast"
144
+
url="none"
145
+
*/>}}
146
+
```
147
+
148
+
The same attribute can be set on the top-level `<podcast-footer url="...">` to override whatever the inline player sends. URLs are sanitized at build time and at runtime; only `http` and `https` schemes are accepted when the link is rendered.
Copy file name to clipboardExpand all lines: exampleSite/content/es/docs/getting-started.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ Después de instalar Wavecast, añade un reproductor de podcast a cualquier pág
44
44
|-----------|----------|---------|-------------|
45
45
| `src` | **sí** |: | URL de audio o ruta de archivo local |
46
46
| `title` | no | `""` | Título del episodio en el reproductor |
47
+
| `url` | no | `""` | Destino del enlace para la etiqueta de fuente del pie. Establece una URL (http/https o relativa al sitio) para hacer la etiqueta clickeable, o `"none"` para ocultar el enlace. Omite para derivar automáticamente desde la fuente de audio. |
47
48
| `poster` | no | `""` | URL de la imagen de portada |
48
49
| `description` | no | `""` | Descripción en Markdown |
Copy file name to clipboardExpand all lines: exampleSite/content/es/docs/homepage-setup.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,30 @@ mostrar todo el texto. Los títulos cortos se renderizan normalmente sin
95
95
animación. El comportamiento respeta `prefers-reduced-motion: reduce`, que
96
96
cae de vuelta a truncamiento con elipsis.
97
97
98
+
## Vincular el Pie
99
+
100
+
El pie persistente muestra una pequeña etiqueta de fuente (el dominio del servidor de audio) bajo el título del episodio. Por defecto esta etiqueta es un enlace al directorio padre del archivo de audio. El parámetro `url` del shortcode sobrescribe u oculta el enlace:
101
+
102
+
- Omitido, derivado automáticamente: el enlace apunta al directorio padre del archivo de audio (ej. `src="https://example.com/episodes/foo.mp3"` produce el enlace `https://example.com/episodes/`).
103
+
- Una URL: el enlace apunta a esa URL. Acepta `http://`, `https://` y rutas relativas al sitio que empiecen por `/`, `#` o `.`.
104
+
- `"none"`: el enlace se oculta por completo. Útil para transmisiones de radio en vivo sin página de episodio.
105
+
106
+
```go-html-template
107
+
{{</* podcast-player
108
+
src="https://example.com/stream.mp3"
109
+
title="Transmisión en vivo"
110
+
url="https://example.com/shows/live"
111
+
*/>}}
112
+
113
+
{{</* podcast-player
114
+
src="https://example.com/stream.mp3"
115
+
title="Transmisión en vivo"
116
+
url="none"
117
+
*/>}}
118
+
```
119
+
120
+
El mismo atributo puede establecerse en el `<podcast-footer url="...">` de nivel superior para sobrescribir lo que envíe el reproductor en línea. Las URL se sanitizan en tiempo de compilación y de ejecución; solo se aceptan los esquemas `http` y `https` al renderizar el enlace.
121
+
98
122
## Ejemplo: Sección de Pie en baseof.html Completa
0 commit comments