Compare commits

...

6 Commits

Author SHA1 Message Date
Mark Dumay
a4057ad498 Merge pull request #1377 from gethinode/develop
Fix rendering of Cloudinary videos in Firefox
2025-01-21 11:12:08 +01:00
Mark Dumay
09d3294867 Merge branch 'main' into develop 2025-01-21 11:00:32 +01:00
Mark Dumay
7b167e32c4 Fix rendering of Cloudinary videos in Firefox 2025-01-21 11:00:00 +01:00
Mark Dumay
941698cc15 Merge pull request #1376 from gethinode/develop
Fix math codeblock rendering
2025-01-21 09:59:23 +01:00
Mark Dumay
1ec7d7477b Merge branch 'main' into develop 2025-01-21 09:08:13 +01:00
Mark Dumay
9ef702ef06 Fix math codeblock rendering 2025-01-21 09:07:36 +01:00
6 changed files with 29 additions and 8 deletions

View File

@@ -42,6 +42,12 @@
host = "youtube"
# toml-docs-end videos
[dam]
videoCodecs = [
"webm/vp9",
"mp4/h265",
"mp4"
]
# toml-docs-start debugging
[debugging]

View File

@@ -64,6 +64,11 @@
[dam]
dimensions = "dimensions.yml"
videoCodecs = [
"webm/vp9",
"mp4/h265",
"mp4"
]
[[dam.providers]]
name = "Cloudinary"

View File

@@ -3,7 +3,7 @@
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
{{ if $.Attributes.class }}
<div class="{{ $.Attributes.class }}">{{ . }}</div>
<div class="{{ $.Attributes.class | safeHTMLAttr }}">{{ .Value }}</div>
{{ else }}
{{ .Value }}
{{ end }}

View File

@@ -117,9 +117,19 @@
{{ end }}
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
{{ $params := "&controls=true" }}
{{ if $autoplay }}{{ $params = print $params "&autoplay=true&muted=true" }}{{ end }}
{{ with .options }}{{ $params = print "&" . }}{{ end }}
{{ $params := "" }}
{{ if $autoplay }}{{ $params = print $params "&player[autoplay]=true&player[muted]=true" }}{{ end }}
{{ $codecs := slice }}
{{ with index site.Params "dam" }}{{ with index . "videoCodecs" }}{{ $codecs = . }}{{ end }}{{ end }}
{{ range $k, $v := $codecs }}
{{ $params = printf "%s&source[source_types][%d]=%s" $params $k (urlquery $v) }}
{{ end }}
{{ if gt (len $codecs) 0 }}
{{ $params = print $params "&source[transformation][1][quality]=auto" }}
{{ end }}
{{ with .options }}{{ $params = print $params "&" . }}{{ end }}
{{ $params = strings.TrimLeft "?&" $params }}
{{ with $params }}{{ $url = print $url "&" . }}{{ end }}
{{ $padding := "56.25%" }}
@@ -138,7 +148,7 @@
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
<iframe src="{{ $url | safeURL }}" title="{{ $title }}" allow="autoplay; fullscreen; encrypted-media" frameborder="0">
</iframe>
</div>
{{ else }}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "0.29.1",
"version": "0.29.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.29.1",
"version": "0.29.2",
"license": "MIT",
"dependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.29.1",
"version": "0.29.2",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",