Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions MarkdownPreview.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@
*/
"github_inject_header_ids": false,

/*
Uses a custom Gitlab domain to access the GitLab API, this enables you to use an on-premises enterprise Gitlab deployment.
This does require that you set a gitlab_personal_token with at least `api` access.
In case this URL is not provided it defaults to "https://gitlab.com/api/v4/markdown".
*/
// "gitlab_url": "https://gitlab.mycompany.com/api/v4/markdown",

/*
Uses an OAuth token when parsing markdown with GitHub API. To create one for Markdown Preview, see https://help.github.com/articles/creating-an-oauth-token-for-command-line-use.
Warn: this secret *must not be shared* with anyone and at least you should create it with minimal scopes for security reasons.
Expand All @@ -199,6 +206,7 @@
*/
// "gitlab_personal_token": "secret",


/*
Sets the default css file to embed in the HTML

Expand Down
2 changes: 1 addition & 1 deletion markdown_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ class GitlabCompiler(OnlineCompiler):
]
compiler_name = "gitlab"
content_type = "application/json"
url = "https://gitlab.com/api/v4/markdown"
url = self.settings.get("gitlab_url", "https://gitlab.com/api/v4/markdown")
authentication_settings_key = "gitlab_personal_token"
authentication_api_key = "Private-Token"
authentication_api_type = ""
Expand Down