How to link to html file in Trac

自古美人都是妖i 提交于 2019-12-05 13:21:11

See 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 file export:/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.


EDIT: It has been backported in 0.10.5, see this ticket.

If you are server index.html in your webserver, you can include it in an Iframe within Trac using the TracTabPlugin

You might also look into IncludeMacro.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!