【问题标题】:How to include external file as Sphinx documentation similar to a code block?如何将外部文件包含为类似于代码块的 Sphinx 文档?
【发布时间】:2015-11-21 11:49:44
【问题描述】:

如何将外部文件包含为类似于代码块的 Sphinx 文档?

我怎样才能让它成为语法颜色的样式?

【问题讨论】:

    标签: python-sphinx code-documentation


    【解决方案1】:

    在这里找到它:http://sphinx-doc.org/markup/code.html

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-05
      • 1970-01-01
      • 2020-03-05
      • 1970-01-01
      • 1970-01-01
      • 2014-07-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多