3

I am trying to add a raw html with a link to a .json file that is located in the _static folder.

.. raw:: html
   <asciinema-player src="/_static/videos/quickstart.json"></asciinema-player>

This works fine locally, where the _static is always on the root of the domain but readthedocs adds a /en/latest to the start of the path.

Making the path relative works for the root domain, but if the raw HTML with a link has any additional path added to it (for example http://jak.readthedocs.io/en/latest/guide/usage.html) then it will say that static is located http://jak.readthedocs.io/en/latest/guide/_static/XYZ which will fail.

I would like to find a solve that works always, and preferably not hardcode /en/latest in case I want to version my documentation or add more languages.

Perhaps there is a better way of inserting the html?

Chris
  • 170
  • 2
  • 11

0 Answers0