Confluence macro plugin which renders remote Markdown.
- Log into your Confluence instance as an admin.
- Click the admin dropdown and choose Add-ons. The Manage add-ons screen loads.
- Click Find new add-ons from the left-hand side of the page.
- Locate marked via search. Results include add-on versions compatible with your Confluence instance.
- Click Install to download and install your add-on.
- You're all set! Click Close in the Installed and ready to go dialog.
- Download the marked jar file either from the Attlasian Marketplace or from GitHub.
- Log into your Confluence instance as an admin.
- Click the admin dropdown and choose Add-ons. The Manage add-ons screen loads.
- Click Upload add-on at the top right of the page. The Upload add-on dialog loads.
- Choose the file from you file system or enter the URL to the location of the raw jar file and click upload. And that's it!
- Select marked in the Select macro dialog.
- Insert the URL of your raw markdown resource in the input field labeled with URL.
- Preview the rendered result by clicking on Preview.
- Insert the rendered content by clicking on Insert. You can now preview and save the document.
When working with repositories which require authentication you'll might need to use the associated API in order to access those files. For example you'll not be able to access a file on a private GitLab instance using the following URL:
https://gitlab.yourdomain.com/your-group/your-project/blob/master/README.md
Instead you will have to authenticate via the GitLab API. You might want to add a guest user to your GitLab project and use his/her private token.
In order to get the correct URL you would do the following:
- Get the project id for a given project name:
https://gitlab.yourdomain.com/api/v3/projects/your-group%2Fyour-project?private_token=your-private-token
- Get a list of files for a given project id:
https://gitlab.yourdomain.com/api/v3/projects/your-project-id/repository/tree?private_token=your-private-token
- Get the raw file content for a given file id:
https://gitlab.yourdomain.com/api/v3/projects/your-project-id/repository/raw_blobs/your-file-id?private_token=your-private-token
Note: When working with another repository management system such as Bitbucket or whatnot you will have to comply with the API given.
Instead of the expected output you might see the following error message:
Cannot read resource. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The cause of the exception is that the resource host is running over SSL
and your Confluence instance doesn't trust the certificate of that host.
The solution is to add the resource host's SSL Certificate to the Confluence Java Keystore.
For more information please refer to the Confluence documentation.
Yes.
If you have any trouble with marked help yourself by filing an issue or even better support back with a pull request.
marked uses the Markdown processing library pegdown under the hood.