Is it possible to display Source Code contents in the Wiki but as a reference to an actual file in Subversion?

Is it possible to display Source Code contents in the Wiki but as a reference to an actual file in Subversion?

I know that I could just copy the source code content and paste is as Code in the Wiki however, if the source code changes I don't want the stale code to be displayed in the Wiki.

1 answer

This widget could not be displayed.

May be you can use the {html} macro and use an iframe inside that which points to the source code url. But am not sure whether this is possible in OnDemand?

Thanks Renjith for the suggestion. I couldn't seem to find a generic HTML macro (only html table, comment etc.). Perhaps this is an OnDemand limitation.

That's right. We don't allow ways to include arbitrary HTML in OnDemand. Unfortunately there's no good way I can think to achieve this.

Ok. Is there a way I can log an enhancement request? Would this be a feature that would be useful to anyone else?

I know many programming purests (even those that have written books) hate the idea of including code as text that is not controlled by Continuous Integration. How often do you read technical books that have code that doesn't actually work? The lack of embedded source code integration with source control systems is the reason for this. Perhaps Atlassian could lead this innovation for Wiki or do 3rd party macros already exist that do this?

Confluence is very weak at displaying source code imho. For years I've been using a wordpress plugin where you specify a url in your <pre> tag and it pulls the code from the url, which is usually a subversion url.

I completely agree about pasting in code, so, if you create an RFE, I'll vote for it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

109 views 1 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you