Include file ☁️
You can include files from a Bitbucket Cloud or DC repository in order to have an up-to-date version of it in a Confluence page. The macro will feature syntax highlighting for the included file and the possibility to export it in PDF or Word.
To include a file you can:
simply paste the URL
add the macro and specify additional options
For files that are within private repositories, users will need to authenticate to view the files' content. More information in this section.
Include file by pasting the file’s URL
You can simply copy the URL of the Bitbucket Cloud or DC file and paste it into the Confluence page.
You can use a Bitbucket DC URL like https://bitbucket.company.com
or in the following example we use this Bitbucket Cloud URL of a .js
file: https://bitbucket.org/atlassian/atlassian-connect-express/src/master/lib/index.js
We then simply paste the URL in the Confluence page as shown in the video and the macro will automatically be applied to embed the file.
To edit the macro’s options listed in the next section, you can click on the edit button present on the macro when editing the page.
Include file by adding the macro
You can also add the macro to set further options.
In order to do so, you can pick the Include Bitbucket File macro from the macro browser. Alternatively you can type directly /Bitbucket File
and ENTER
to add and edit the macro.
You will then be able to specify the following:
| URL of the file |
---|---|
| Format/ language for highlighting purposes (auto detect is performed by default) |
| Your title for the macro |
| Tick to display number of lines in the file |
| Hide the file header that contains the path to the file |
| Collapses the file content and gives the option to expand and collapse |
Demo videos
Here is a Demo Video on How to include content from your Git repositories directly into Confluence, using major hosting services like Bitbucket, GitLab, and GitHub. As simple as copy-pasting Bitbucket URLs or GitHub, GitLab links, you can easily integrate and render files in various formats, including Markdown, AsciiDoc, PlantUML diagrams, images, and more.
Curious how we used Oma’s famous sauerkraut recipe stored in Bitbucket? 🍲🥬
In this Apptoberfest 2024 video, we blend tradition with tech by showing how Include Bitbucket for Confluence keeps documentation and recipes in perfect sync!
Watch to see how Bitbucket files—Markdown, PlantUML diagrams, AsciiDoc, and more—are instantly rendered in Confluence, making collaboration effortless. Say goodbye to outdated Confluence docs, and keep them in sync between Confluence and Bitbucket automatically 🥳
In this video, we introduce PlantUML, a powerful tool that simplifies how your team creates and manages technical diagrams with just text.
🔍 What you'll learn:
How to render a PlantUML diagram directly in Confluence using the Include Bitbucket for Confluence app.
Automatically pull and render diagrams from Bitbucket repositories into Confluence for easy collaboration and streamlined documentation.
Watch as we take a PlantUML file and transform it into a sequence diagram, turning complex workflows into clear, visual guides.
Experience the latest update to Include for Confluence with an enhanced dark theme. Now, your Bitbucket files sync are in a dark theme, creating a smoother, more eye-friendly workflow across all your tools. Perfect for developers working late hours, this new feature ensures consistency and focus.