The Markdown from a URL macro renders Markdown content from URLs or from profiles. Profiles are a means of retrieving data from other external sources such as other applications or even databases.
Infonote |
---|
Markdown content containing links or images referring to a public location can be accessed and then rendered. Currently, any links or images that refer to a private repository, or a location that must be logged in to, cannot be accessed and thus, rendered ; watch this ticket for updates |
Info |
---|
|
- Only raw URLs must be given in either, the URL field in profiles or the URL to markdown file field, in the macros. A raw URL is defined as the part of the URL following the domain information and includes the query string, if present. For example, in the URL string http://www.contoso.com/articles/recent.aspx, the raw URL is /articles/recent.aspx.
- It is recommended to specify absolute URLs to access files from public locations and to use profiles to access files from private sources. For example, a raw URL that can access a Markdown file in a public Bitbucket repository is valid. But to render a Markdown file located in a private repository, we recommend using a profile.
- Profiles are a means to access and retrieve contents from external applications such as Bitbucket, GitLab or GitHub. A profile already contains the base URL and the required credentials (user credentials or an access token) to access the relevant application.
- This method allows multiple users to access a profile across pages and instances of the macro.
|
Parameters
Macro Browser Labeleditor label | Parameter | Default | Description |
---|
Profile | profile |
| Specify a profile to be used with the macro. Administrators set up profiles to connect to other applications such as GitHub or GitLab. Profiles contain a basic set of parameters used to access a remote location such as the type of URL, user credentials, and so on. Some profiles may be restricted. Since 2.0. Note |
---|
- Contact your administrator to know more about the profiles used in your instance.
- If a profile is specified, it is recommended to provide the relative path to the location of the Markdown file to be rendered.
|
|
URL to Markdown file | url |
| Enter the relative path to the Markdown file to be displayed. If a valid path is entered here, the macro accesses the given location and processes the Markdown content accordingly.
A profile comprises a base URL and other credentials that are required to access a specific application. These details point to the actual location where the required Markdown file is available. The contents are then accessed and displayed through the macro. Info |
---|
- For Markdown files available on apps linked to Confluence, entering the username and password parameters may not be necessary.
- If you are rendering the file in the Markdown macro for the first time, you are asked to authorize the app via Click to authorize link. For subsequent requests, the app works seamlessly.
- File permissions are applied based on the user profiles and respective levels of access in the linked app.
To know more about linking apps with Confluence, refer to Application links. Since 3.4 |
|
URL user | user |
| Enter the user name for the given URL to access the required Markdown file.
|
URL password | password |
| Enter the user password for the given URL to access the required Markdown file.
|
URL connection timeout | timeout |
| Enter time in milliseconds such that URL connections does not disconnect before getting data. Use this to increase the access time needed for slow connections. Note that if a zero is given the connection may wait infinitely. |
File encoding | encoding | UTF-8 | Specify the encoding for an external file, if different from default system handling. |
Show URL | showURL | Off | Enable this option to display the absolute path of the Markdown file. The URL given in the URL to markdown file parameter is appended to the URL given in the specified profile to form the absolute path of the required Markdown file. |
Note |
---|
It is mandatory to specify either a profile or a URL for this macro. |
...
Selected from the macro browser | Markdown from a URL |
---|
Markup shortcut | {markdown-url} |
---|
Screenshot
...