Include external resources in a wiki page

The following documentation is for the latest development version.


This macro lets you include various things.

Currently supported sources:

  • HTTP - http: and https:
  • FTP - ftp:
  • Wiki pages - wiki:
  • Repository files - source:
  • Ticket comments - ticket:N:comment:M (3.0dev, syntax may be changed before release)

The default source is wiki if only a source path is given.

An optional second argument sets the output MIME type, though in most cases the default will be correct.


The three remote sources (http, https, and ftp) require INCLUDE_URL to be rendered.

Anyone can add a call to these, however they will not be shown. This is not a replacement for render_unsafe_content, see below.


If [wiki] render_unsafe_content is off (the default), any produced HTML will be sanitized.


This is a potential security risk! Please review the implications render_unsafe_content before using this feature.

To enable the plugin:

includemacro.* = enabled


Include another wiki page:


Include the HEAD revision of a reStructuredText file from the repository:

[[Include(source:trunk/docs/README, text/x-rst)]]

Include a specific revision of a file from the repository:

[[Include(source:trunk/docs/README@5, text/x-rst)]]


If you set the svn:mime-type property on the file, you can leave off the explicit MIME type.

See also: IncludePagesPlugin

Bugs/Feature Requests

Existing bugs and feature requests for IncludeMacro are here.

If you have any issues, create a new ticket.


23 / 34


13 / 28


1 / 1


Download the zipped source from here.

The macro is also hosted on PyPi.


Get the appropriate version for your Trac installation:

Final version for Trac 0.10 1.1.0 Browse the source or checkout from here using Subversion
Latest stable for Trac 0.11 2.1.0 Browse the source or checkout from here using Subversion
Development version for Trac 0.11 through 1.0 3.0.0dev Browse the source or checkout from here using Subversion

Recent Changes

15552 by rjollos on 2016-05-16 17:09:23
3.0.0dev: Avoid AttributeError when resource not specified

Fixes #12778.

15121 by rjollos on 2015-12-14 05:18:47
3.0.0dev: Revise comment

Refs #12573.

15119 by rjollos on 2015-12-12 05:52:38
3.0.0dev: Trap NoSuchChangeset exceptions

Fixes #12573.



Author: coderanger
Maintainer: Ryan J Ollos
Contributors: hasienda

Last modified 2 months ago Last modified on Aug 17, 2016, 10:53:46 PM