使用 RestructedText 和 Sphinx 包含预格式化文件
我正在尝试使这个片段起作用:
Version History
---------------
These are the versions over time::
.. include:: ../../CHANGES.txt
也就是说,使用 include 指令,以便将文件作为块引用包含在内。一旦进入块引用,指令就会被引用。我想要将文件的内容放在块引用中。
知道如何做到这一点吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为 ..literalinclude:: 指令应该给你你想要的。
I think the .. literalinclude:: directive should give you what you want.