Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds start-aware youtube shortcode #10521

Closed

Conversation

sgharms
Copy link
Contributor

@sgharms sgharms commented Dec 10, 2022

Closes #10520

@CLAassistant
Copy link

CLAassistant commented Dec 10, 2022

CLA assistant check
All committers have signed the CLA.

@sgharms sgharms force-pushed the add-youtube-shortcode-start-offset branch from 2bd2cee to 7bb6392 Compare December 10, 2022 18:44
@bep
Copy link
Member

bep commented Dec 14, 2022

Thanks for this;

Can you push the "sign CLA button" above?

@sgharms sgharms force-pushed the add-youtube-shortcode-start-offset branch from 7bb6392 to 1fc0b04 Compare December 21, 2022 10:03
@sgharms
Copy link
Contributor Author

sgharms commented Dec 21, 2022

@bep CLA signed, code cleaned, additional test added. LMK if there are things to change.

Additionally, provides an extensible pattern for passing
additional query parameters.
@sgharms sgharms force-pushed the add-youtube-shortcode-start-offset branch from 1fc0b04 to 617c956 Compare December 21, 2022 10:48
@gohugoio gohugoio deleted a comment from septs Dec 22, 2022
@gohugoio gohugoio deleted a comment from septs Dec 22, 2022
@bep
Copy link
Member

bep commented Dec 22, 2022

@septs both of those suggested changes looked good, but it makes it extremely hard to review a specific change with unrelated changes coming in from the side line.

@sgharms
Copy link
Contributor Author

sgharms commented Dec 22, 2022

@bep So your suggestion, if I understood it correctly, is to deconstruct this PR into:

  1. Move query string parameterization to use querify
  2. Add support for offset in youtube short-code

Given that I currently have a test failure, maybe that's a better way forward so there's less complexity to review / debug.

sgharms added a commit to sgharms/hugo that referenced this pull request Dec 23, 2022
The construction of the query string relied on a
generation method that assumed there would only
ever one be parameter (`autoplay`).

Adding support for an additional param e.g.
`start` requires detecting whether either option
was set in the shortcode, delimiting with `&` and
various other logic that are captured in
`querify`.

Move to using `querify` and ship, under separate
PR, addition of support for a `start` offset
parameter (see: gohugoio#10521).
sgharms added a commit to sgharms/hugo that referenced this pull request Dec 23, 2022
It's sometimes nice to begin a video `start`-many
seconds from the beginning.

Fixes gohugoio#10521.
@sgharms
Copy link
Contributor Author

sgharms commented Dec 23, 2022

@bep Closing this in favor of smaller PRs:

#10575 and then
#10576

@sgharms sgharms closed this Dec 23, 2022
@sgharms sgharms deleted the add-youtube-shortcode-start-offset branch December 23, 2022 10:40
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for start offset to the internal youtube shortcode
3 participants