...
This article illustrates how to create a profile in the Markdown macros using a URL.
Info |
---|
Before you begin:
/projects/:id/repository/files/:file_path/raw
https://gitlab.com/api/v4
https://gitlab.com/api/v4/projects/:id/repository/files/:file_path/raw?ref=master
|
...
There are three ways to work with URLs where you can use:
- An absolute URL in a profile
- A partial URL in a profileAn absolute URL directly instead of via a profile
For this example, let's consider using profiles with the HTML macro.
AnchorMD_Cld_HowTo_CompleteURL MD_Cld_HowTo_CompleteURL
Using an absolute URL in a profile
MD_Cld_HowTo_CompleteURL | |
MD_Cld_HowTo_CompleteURL |
You can create a profile by providing the complete URL for the Markdown HTML/XML content.
Navigate to CONFLUENCE ADMINISTRATION > Settings > ATLASSIAN MARKETPLACE > Markdown Configuration > ProfilesHTML > Profiles.
Tip title Try this for newer Confluence versions Select > Manage apps, either search for HTML for Confluence or scroll to Bob Swift Configuration, and click HTML to view app configuration.
Click Add Profile.
- Enter a unique name for the profile in the Profile name text box. For this example, enter BitURL in the text box.
- Select URL from the options in Profile type.
Enter https://bitbucket.org/bob_swift/gint/raw/9c1b737cf0ff28ddf7cbbd199685e533d310ce9f/README.mdhtml in the URL text box.
Click Save profile to create the profile.
To use this profile in a Confluence page:
- Search for the Markdown from a URL macro and edit itAdd the HTML macro or edit an existing macro on the page.
- Select BitURL from the Profile list and then, click Save.
<screenshot>
AnchorMD_Cld_HowTo_FixedURL MD_Cld_HowTo_FixedURL
Using a partial URL in a profile
MD_Cld_HowTo_FixedURL | |
MD_Cld_HowTo_FixedURL |
You can create a profile by providing a partial URL for the Markdown content to access the remote location and entering relative path to the Markdown relevant file in the markdown-url HTML macro.
Navigate to CONFLUENCE ADMINISTRATION > Settings > ATLASSIAN MARKETPLACE > Markdown Configuration > ProfilesHTML > Profiles.
Tip title Try this for newer Confluence versions Select > Manage apps, either search for HTML for Confluence or scroll to Bob Swift Configuration, and click HTML to view app configuration.
Click Add Profile.
- Enter a unique name for the profile in the Profile name text box. For this example, enter BitURL in the text box.
- Select URL from the options in Profile type.
Enter https://bitbucket.org in the URL text box.
Click Save profile to create the profile.
...
To use this profile in a Confluence page:
- Search for the markdown-url macro and edit itAdd the HTML macro or edit an existing macro on the page.
- Select BitURL from the Profile list in the editor.
- Enter the relative path to the /bob_swift/gint/raw/9c1b737cf0ff28ddf7cbbd199685e533d310ce9f/README.md Markdown file in the URL to markdown file parameterhtml file in the Location of HTML data parameter.
- Click Save.
<screenshot>
...
You can skip creating a profile and enter the absolute URL in the URL to markdown file parameter.
- In a Confluence page, search for the Markdown from a URL macro and edit it.
- Enter https://bitbucket.org/bob_swift/gint/raw/9c1b737cf0ff28ddf7cbbd199685e533d310ce9f/README.md in the the URL to markdown file parameter.
- Click Save.
...
Info |
---|
This method allows multiple users to access a profile across pages and instances of the markdown-url macro. |
...
macros. |