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

Embedding iFrame at index.rst #153

Closed
DanielHe4rt opened this issue Jun 25, 2024 · 2 comments · Fixed by #154
Closed

Embedding iFrame at index.rst #153

DanielHe4rt opened this issue Jun 25, 2024 · 2 comments · Fixed by #154
Labels
documentation Improvements or additions to documentation

Comments

@DanielHe4rt
Copy link
Collaborator

Hey @dgarcia360! I'm trying to embed an iframe in the index.rst page but with no luck.

Should I enable a feature to make it work?

This is the Embed in the case (you can use it for now, the token will be replaced):

<iframe width="1140" height="640" sandbox="allow-forms allow-modals allow-popups allow-same-origin allow-scripts" src="https://play.instruqt.com/embed/scylladb/tracks/carepet-rust?token=em_Z_xvk5h6RxovmnDS&show_challenges=true" style="border: 0;" allowfullscreen> </iframe>
@DanielHe4rt DanielHe4rt added the documentation Improvements or additions to documentation label Jun 25, 2024
@dgarcia360
Copy link
Contributor

dgarcia360 commented Jun 28, 2024

To include an iframe on any RST page, you should wrap it with the .. raw:: html directive:

.. raw:: html

    <iframe width="1140" height="640" sandbox="allow-forms allow-modals allow-popups allow-same-origin allow-scripts" src="https://play.instruqt.com/embed/scylladb/tracks/carepet-rust?token=em_Z_xvk5h6RxovmnDS&show_challenges=true" style="border: 0;" allowfullscreen></iframe>

@DanielHe4rt
Copy link
Collaborator Author

Seems to work properly now, thanks! The problem was the indentation/spacing of the html blocks.

I'll merge a PR in the next minutes with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants