GitXplorerGitXplorer
b

marked

public
46 stars
21 forks
9 issues

Commits

List of commits on branch main.
Verified
a57a41575077387a1983c0f7cb5155cba08d3e2f

docs: add contributing notes

bborisdiakur committed a year ago
Verified
1e6a2032fcb8489231b93dad5fdc7c80e888f1fe

Support release for Confluence 8.6.1

bborisdiakur committed a year ago
Unverified
6dc44e6ad6b9dafe6bd43e938231887b984d1c51

Bump gson from 2.2.2-atlassian-1 to 2.10.1

bborisdiakur committed 2 years ago
Unverified
9f84ca2ddb682543182ce80e8ef73ae5dd5ca7ec

Support for OAuth2-style bearer (token) authentication

bborisdiakur committed 2 years ago
Unverified
564b6bdc0d133a9677c10391a31dd7ddb64b580a

Updated README following support for bearer token authorization

committed 6 years ago
Unverified
0816b355a572d45bc3ebde6e1140668445af07aa

Added support for OAuth2-style bearer (token) authentication via x-token-auth

committed 6 years ago

README

The README file for this repository.

marked

Confluence macro plugin which renders remote Markdown.

screenshot showing usage of marked

Installation

  1. Log into your Confluence instance as an admin.
  2. Click the admin dropdown and choose Add-ons. The Manage add-ons screen loads.
  3. Click Find new add-ons from the left-hand side of the page.
  4. Locate marked via search. Results include add-on versions compatible with your Confluence instance.
  5. Click Install to download and install your add-on.
  6. You're all set! Click Close in the Installed and ready to go dialog.

Manually

  1. Download the marked jar file either from the Atlassian Marketplace or from GitHub.
  2. Log into your Confluence instance as an admin.
  3. Click the admin dropdown and choose Add-ons. The Manage add-ons screen loads.
  4. Click Upload add-on at the top right of the page. The Upload add-on dialog loads.
  5. Choose the file from your file system or enter the URL to the location of the raw jar file and click upload. And that's it!

Usage

  1. Select marked in the Select macro dialog.
  2. Insert the URL of your raw markdown resource in the input field labeled with URL.
  3. Preview the rendered result by clicking on Preview.
  4. Insert the rendered content by clicking on Insert. You can now preview and save the document.

FAQ

1. Can marked access resources which reside in a private repository?

When working with repositories which require authentication you'll 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:

  1. 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
  2. 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
  3. 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

For private Bitbucket repositories, token authentication is supported:

  1. For the user authorized to access the repository, add a Personal Access Token in the account settings
  2. Place the token in the URL: https://x-token-auth:TOKEN@bitbucket.example.com:PORT/rest/api/1.0/projects/PROJECT/repos/REPO/raw/README.md

Note: When working with another repository management system you will have to comply with the API given.

marked also supports basic auth (http[s]://user:password@...) and bearer (token) auth (http[s]://x-token-auth:token@...).

2. I get a PKIX path building failed error. What's that?

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.

3. Is it free of charge?

Yes.

Support

If you have any trouble with marked help yourself by filing an issue or even better support back with a pull request.

Contributing

The default Apache Maven instance boundled with the Atlassian SDK is outdated. If you want to build the plugin yourself, you will need to change it. The latest version of marked is built with Apache Maven 3.9.5. Background: Confluence 8.0 has added support for Java 17. To develop apps running against Java 17, you must be running with AMPS 8.3.3 or later. Apache Maven 3.6.3 is the minimum version required starting from AMPS 8.3.0.

Privacy Notice

marked does not collect any data.

Credits

marked uses the Markdown processing library flexmark-java under the hood.