'How to include external file as Sphinx documentation similar to a code block?

How to include external file as Sphinx documentation similar to a code block?

And how can I make it style the syntax color?



Solution 1:[1]

Found it here: http://sphinx-doc.org/markup/code.html

.. literalinclude :: <path/to/file>
   :language: <file_language>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 user805981