Can I link a Confluence code block macro to an existing source file?

Joe Steele December 4, 2017

I would like to be able to refer to a file in github and ideally specify the range of lines I want to display -- e.g. startline=27;lastline=40.

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2017

Hi Joe,

Text inserted into the code block macro must be manually typed or pasted in. It is not possible to link to a file.

I've created a feature request a while back to be able to drag and drop a file or text into the macro. If you're interested, please vote on it and watch it for further updates:

Kind regards,

Shannon

Joe Steele December 5, 2017

Hi Shannon,


Thanks for your response! I saw your request and although that is interesting (I upvoted it) it is not what I am looking for. I actually want to be able to pull in current file contents from a link. 

I thought someone might tell me there is another macro I should be using, since this seems like an obvious feature.

I added CONFSERVER-54394 address this.

 

Sincerely, 

Joe

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2017

Thanks, Joe!

Both deal with using a file to fill the macro, so it may be closely related. We can suggest both outcomes.

I'll link your case to mine in case it would be the same feature.

Take care!

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events