tags:

views:

115

answers:

3

I want to link from my project trac page to my javadoc index.html file, which is located inside the source repository.
However I don't know how to link in such a way that the file will be rendered as a usual page (I tried [source:.../index.html] and [http://.../index.html%5D, both just displays its content, as any other source file)

edit: 'export links' (as answered by Gregory Pakosz) seem to be exactly what i need, however they were added in 0.11 and we currently work with 10.3 (with no intention to upgrade due to some broken functionality with templates). Is there any plugin to support it in 10.3 version?

+1  A: 

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.

Gregory Pakosz
thanks for the answer, please see my edit above
Asaf David
upgrading from 0.10.3 to 0.10.5 isn't an option?
Gregory Pakosz
A: 

You might also look into IncludeMacro.

retracile
A: 

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

RjOllos