We’ve just rolled out a new feature which enhances the
[[include]] wiki macro in Apache Allura (which powers SourceForge projects). Before this addition, the macro has typically used to include the contents of a different wiki page into the current page. This has now been expanded to to allow a file in a (SVN, Git, or Mercurial) repository to be the import source. We expect this will particularly useful for projects that like to keep their documentation in their repository, but also want it to be easily accessible from the web in a wiki.
Here’s an example of how this might work:
Let’s say I want to include this example document written in Markdown into a wiki page.
I go to the edit mode for the wiki page, and enter this macro:
[[include repo=git path=example-documentation.md]]
Note: for the “repo”, you need to specify the name (ie., mount point) of the repository, not the type. In my example, the name of the repository is “git”.
And that’s it! You can now see the contents on the wiki page: https://sourceforge.net/p/uberproject/wiki/include_demo/
Of course, this feature works with SVN, Git, and Mercurial repositories on the SourceForge site. Another benefit of this feature, is that the import module supports a variety of formatting languages, so you’re no longer limited to just Markdown.
The format is detected by the file extension, we support the following:
Source code file extensions (eg., .c and .py) will be syntax highlighted, but will otherwise be unformatted. All other file extensions will be rendered as plain-text. Binary files, of course, can’t be displayed.