Include a text file *as is* in (Python) Sphinx Docs

后端 未结 2 626
伪装坚强ぢ
伪装坚强ぢ 2021-01-17 11:38

(using Python-Sphinx Documentation tool)

I have a .txt log file I\'d like to build into _build/html unaltered. What do I need to

相关标签:
2条回答
  • 2021-01-17 11:51

    I think you can include an external document fragment, as described here:

    http://docutils.sourceforge.net/docs/ref/rst/directives.html#including-an-external-document-fragment

    From that text, something like this should do it:

    .. include:: inclusion.txt
       :literal:
    
    0 讨论(0)
  • 2021-01-17 11:54

    The correct answer is the :download: role.

    Cf: Georg's answer on the Sphinx Mailing List

    0 讨论(0)
提交回复
热议问题