Skip to content

Commit

Permalink
Merge pull request #1370 from gethinode/develop
Browse files Browse the repository at this point in the history
Support options for Cloudinary videos
  • Loading branch information
markdumay authored Jan 18, 2025
2 parents 2db3365 + 23ece83 commit 73afeb1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 5 additions & 7 deletions data/structures/video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,10 @@ arguments:
- 16x9
- 21x9
release: v0.26.5
portrait:
type: bool
options:
type: string
optional: true
default: false
release: v0.28.2
comment: >-
Flag to adjust the ratio from landscape to portrait. The image itself is
not rotated, only the crop area is adjusted. Not applicable to vector
graphics.
release: v0.26.5
Optional query parameters to append to video asset's url. The query string
is prepended with a `?` symbol. Only applicable to Cloudinary.
4 changes: 3 additions & 1 deletion layouts/partials/assets/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@
{{ $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 $params }}{{ $url = print $url . }}{{ end }}
{{ with .options }}{{ $params = print "&" . }}{{ end }}
{{ $params = strings.TrimLeft "?&" $params }}
{{ with $params }}{{ $url = print $url "&" . }}{{ end }}
{{ $padding := "56.25%" }}

{{ $thumbnail := partial "utilities/URLJoin.html" (dict "base" (path.Dir $id) "path" (printf "%s.jpg" (path.BaseName $id))) }}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.28.1",
"version": "0.28.2",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
Expand Down

0 comments on commit 73afeb1

Please sign in to comment.