Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning
titleRemoval notice (applicable for Markdown from a URL macro):

Please note that the URL user and URL user password parameters were removed (see Deprecation notice: URL user and URL user password parameters). We recommend using profiles to access external data.

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.

...

 You can read more about profiles from this link

Info

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.


Info
titlePoints to remember!
  • 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.

Basic use

This macro can be deployed using one of the following methods:

...

Macro Editor LabelDefaultDescriptionMacro Parameter
Profile

Enter a profile name.

Profiles are default parameters provided by the administrator.

 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. 

Note
  • Contact your administrator to know more about the profiles used in your instance. To know more about how profiles are configured, refer to this link.
  • If a profile is specified, it is recommended to provide the relative path to the location of the Markdown file to be rendered.


profile
URL to markdown file

Enter the relative path to the Markdown file to be displayed. If a valid path is entered here, the URL of the Markdown file. 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.

Note
  • Specify only raw URLs referring to a Markdown file in a public location (that does not require to be logged in) here! 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.
  • If an absolute URL is
given
  • entered here, the macro reads content from the specified URL. If a profile is also specified, the macro ignores the given profile and processes content through the
profile is ignored
  • given URL.
  • URLs are processed using a fixed precedence explained as follows:

    1. If Profile is specified, the macro appends the URL given here with the URL specified in the profile configuration, and accesses the location to render the required file.
    2. If profile is not specified, the URL are processed as-is and the required file is rendered.


url
URL user (removed)

Enter the user name for the given URL to access

that requires basic authentication

the required Markdown file.

Warning
titleRemoval notice (applicable for Markdown from a URL macro):

Please note that the URL user and URL user password parameters were removed (see Deprecation notice: URL user and URL user password parameters). We recommend using profiles to access external data.


user
URL passwordpassword (removed)

Enter the user password for the given URL to access the required Markdown file.

Warning
titleRemoval notice (applicable for Markdown from a URL
access that requires basic authentication
macro):

Please note that the URL user and URL user password parameters were removed (see Deprecation notice: URL user and URL user password parameters). We recommend using profiles to access external data.


password
URL connection timeout
Enter time in milliseconds such that URL connections do does not timeout 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.timeout
File encodingUTF-8

Specify the encoding for an external file, if different from default system handling.

encoding


Note

It is mandatory to specify either a profile or a URL for this macro.


Info
titleHow profiles and URLs are processed in the macro

Depending on the values provided for the Profile and URL to markdown file parameters, the following process applies:

Is Profile given?

(Y - Yes, N - No)

Is URL to markdown file given?

(Y - Yes, N - No)

Macro behavior
YNAccesses the URL specified in the profile through the pre-configured information.
NYAccesses the URL specified and renders the Markdown content as required.
YYAppends the URL mentioned in the URL to markdown file parameter to the URL configured in the profile. Thus, the macro creates
a relative
an absolute path to the Markdown file. If this path is not valid, a network error message is displayed.
To resolve this issue, contact
 Contact your Confluence administrator
for more information
to know how you can resolve the issue.


Common parameters

The following parameters are available for all the Markdown macros:

...

The following example uses an absolute URL in URL to markdown file of the macro settings:

Additional links