gpt4 book ai didi

trac - 如何链接到 Trac 中的 html 文件

转载 作者:行者123 更新时间:2023-12-01 00:04:54 26 4
gpt4 key购买 nike

我想从我的项目 Trac 页面链接到我的 javadoc index.html 文件,该文件位于源存储库内。但是,我不知道如何以文件将呈现为通常页面的方式进行链接。我试过 [来源:.../index.html] 和 [ http://.../index.html]两者都只显示其内容,就像任何其他源文件一样。

从 Trac 0.11 版开始,[export:.../index.html](由 Gregory Pakosz 回答)似乎正是我所需要的,但是我们目前使用 10.3(由于一些损坏,无意升级模板功能)。 10.3 版本有没有插件支持?

最佳答案

export: links

export: links

To force the download of a file in the repository, as opposed to displaying it in the browser, use the export link. Several forms are available:

export:/some/file - get the HEAD revision of the specified file

export:123:/some/file - get revision 123 of the specified fileexport:/some/file@123 - get revision 123 of the specified file

This can be very useful for displaying XML or HTML documentation with correct stylesheets and images, in case that has been checked in into the repository. Note that for this use case, you'd have to allow the web browser to render the content by setting [browser] render_unsafe_content = yes (see TracIni#browser-section), otherwise Trac will force the files to be downloaded as attachments for security concerns.



编辑:它已在 0.10.5 中向后移植,请参阅 this ticket .

关于trac - 如何链接到 Trac 中的 html 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1938532/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com