Reputation: 57251
For most of my project's documentation I prefer a standard sphinx layout. However for the landing page I would prefer to use custom HTML/CSS/JS without any of the layout, TOC, or sidebars of the normal sphinx site. Is there a way to include a raw HTML standalone page in a sphinx-generated website in a way that completely disregards the normal layout of the rest of the site?
As a counter example I know that I can include raw HTML bits into a page using the following (see also this question)
.. raw:: html
:file: myfile-html
However this just embeds a file within the normal layout. I would like to have a completely standalone HTML page.
Upvotes: 9
Views: 8445
Reputation: 1548
I just ran into this problem myself, and the way I solved it was to simply include the html file in my source/_static
folder, then refer to it with a relative link.
So if source/_static/my_standalone.htm
is the path where I have my non-generated HTML file, and the .rst file where I want to type my link is at source/otherfolder/index.rst
, I write it like this in my rst:
Link to my non-Sphinx HTML file
===============================
To get to my standalone, non-generated HTML file,
just `click here <../_static/my_standalone.html>`_ now!
Upvotes: 9