Versions Compared

Key

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

Description

Warning
titleRemoval notice:

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

This article illustrates the process of adding a GitHub profile to the Markdown from a URL macro.

Info

Before you begin:

To add a profile, you will need the following:

Global Configuration settings:

  • Whitelist the URL for GitHubaccess token for information about generating a GitHub access token. Refer to GitHub access token for the actual URL to get the access token if you have a GitHub account.
  • Whitelist the GitHub URL in Confluence configuration settings if Restrict URL access in Markdown for Confluence Configuration is enabled.
  • Raw URL of the file to be rendered. 

    Info

    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.


    Tip
    titleHow to identify if a file is valid for the macro?

    Paste the file link into your browser's address bar. If the actual code is displayed in the browser, it is considered to be invalid or in an incorrect format. If the file downloads to your system, the macro(s) can process the file and its contents.


Steps

  1. Navigate to CONFLUENCE ADMINISTRATION > General Configuration > BOB SWIFT CONFIGURATION > Markdown > Profiles.

  2. Click Add Profile.

  3. Enter a unique profile name in the Profile name text box. 

    Info

    Ensure that you provide a unique profile name. If you add a profile name that already exists, Markdown will replace  the existing profile gets replaced with the given information.


  4. Select GitHub

    Enter the API URL for Select GitHub from the options in Profile type.

     You will notice that the Request header parameters are auto-filled.
    Image Removed


    Image Added

    Note

    The Request headers parameter is auto-filled and more information gets appended as other relevant parameters are filled.


  5. Enter the relevant URL for GitHub in the URL text box. For example,Example: https://api.github.com/repos.

     for
    Info

    To know more about URLs, refer to Create a profile with a URL.

    Enter the personal access token

    It is recommended to provide only the base URL in this text box and let the users enter the relevant relative path to the actual file to be rendered through the macro. This method allows multiple users to access a profile across pages and instances of the macros.


  6. Enter User and Password credentials required to access the given URL, or enter the access token for your GitHub profile in the Access token text boxRefer to this personal access token article to know how to create your personal access token. 

    Note

    Access tokens 

    Click 

    or API tokens are a means of user authentication; so, if mentioned, this token is used for authentication instead of using the user credentials. Thus, provide either the user credentials or an access token, but not both.


  7. Click Save profile to create the profile.

Addition links

...