-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
youtube shortcode is not working. #371
Comments
Hi Soumendra! Did you allow youtube connections through the CSP? |
Thanks @welpo for the precise solution. After making the following changes, it fixed the issue. allowed_domains = [
{ directive = "font-src", domains = ["'self'", "data:"] },
{ directive = "img-src", domains = ["'self'", "https://*", "data:"] },
{ directive = "media-src", domains = ["'self'", "https://cdn.jsdelivr.net/"] },
{ directive = "script-src", domains = ["'self'"] },
{ directive = "style-src", domains = ["'self'"] },
- { directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube-nocookie.com"] },
+ { directive = "frame-src", domains = ["player.vimeo.com", "https://www.youtube.com"] },
] |
Glad to hear! The example CSP example uses youtube-nocookie for privacy reasons (and because it was the default shortcode built-in with Zola until some time ago). You might want to modify your shortcode to use the youtube-nocookie URL. The old shortcode:
|
@welpo Thanks for this snippet. Is there any reason why Zola removed this shortcode? |
They were removed here: getzola/zola@a56e424 Reasoning:
I might add Vimeo/YouTube shortcodes to tabi and mention the CSP changes necessary to make them work on the documentation. |
Bug Report
I have used an YT shortcode which was working fine withe Apollo theme. However, in tabi I am facing issue.
I have added this file,
youtube.html
under templates/shortcodeEnvironment
Zola version: 0.19.1
tabi version or commit: 2.13.0
Expected Behavior
Youtube video should have come as an embedding.
Current Behavior
Tell us what happens instead of the expected behavior.
link
Step to Reproduce
The text was updated successfully, but these errors were encountered: