This article helps in configuring the Github profile within the Markdown configuration and also explains how to pass the URL to the markdown file within the macro.
- Log in to Jira as an Administrator to configure the Markdown app.
- Under Manage Apps → Markdown for Confluence, click Configure.
- Navigate to Profiles → Add profile.
- Give a Profile name and select the Profile type as Github.
Specify the URL as:
- Pass the Username and Access token of the Github account.
Note: Refer to this document for generating access tokens: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
- Click on Save Profile.
- Now, navigate to the page where the macro Markdown from a URL is used or Insert the macro to configure it.
- Click on the macro to edit it and pass the profile name (that is created through the above steps) in the profile parameter.
Within the URL to markdown file parameter, pass the value in the given format:
Refer to this GitHub documentation for getting repository content format: https://docs.github.com/en/rest/reference/repos#get-repository-content
- Publish the page to see the results of the markdown file.
Make sure the Profiles are added to the Allowlist under the Markdown configuration if the URLs are restricted within Global Configuration.
The regular expression is tested here: https://www.freeformatter.com/regex-tester.html