Using RestructuredText and Sphinx to include a preformatted file
-
20-09-2019 - |
Question
I'm trying to make this fragment work:
Version History
---------------
These are the versions over time::
.. include:: ../../CHANGES.txt
That is, use the include directive so that a file is included as a block quote. Once inside a block quote, the directive is quoted. I want the contents of the file in a block quote.
Any idea how to do this?
Solution
I think the .. literalinclude:: directive should give you what you want.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow