scylladb / care-pet

Care Pet IoT ScyllaDB example
https://care-pet.docs.scylladb.com/
Apache License 2.0
48 stars 28 forks source link

Embedding iFrame at index.rst #153

Closed DanielHe4rt closed 4 months ago

DanielHe4rt commented 4 months ago

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>

dgarcia360 commented 4 months ago

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 commented 4 months ago

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.