Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
Markdown Preview user settings
*/
{
/*
Sets the default opener for HTML files
default - Use the system default HTML viewer
other - Set a full path to any executable. ex: /Applications/Google Chrome Canary.app or /Applications/Firefox.app
*/
"browser": "default",
/*
Sets the parser used for building markdown to HTML.
NOTE: The parser setting is not for the preview commands.
The previews have separate commands for each parser markdown.
Warning for github API: if you have a ST2 linux build, Python is not built with SSL so it may not work
default - The current default parser is python-markdown parser.
markdown - Use the built-in python-markdown parser
github - Use the github API to convert markdown, so you can use GitHub flavored Markdown, see https://help.github.com/articles/github-flavored-markdown/
gitlab - Use the gitlab API to convert markdown, so you can use GitLab flavored Markdown, see https://docs.gitlab.com/ee/user/markdown.html
*/
"parser": "markdown",
/*
By default, Markdown Preview builds the HTML in the source directory.
It expects the file to exist on disk. It pops up the build output panel etc.
If you wish to override this behavior, you can change "build_action"
build - The default build behavior.
browser - Preview the file in your browser.
clipboard - Copy the HTML output to the clipboard.
sublime - Export the HTML to a Sublime tab.
save - Run the normal save command that outputs to the source directory.
It will also prompt for "save as" if the file does not exit on disk.
All the build options use the default parser defined above in "parser"
*/
"build_action": "build",
/*
Enables MathJax configuration.
*/
"enable_mathjax": true,
/*
If Pygments is being used, you may want to inject one of the Pygment styles provided into the HTML.
If so, enable this.
*/
"pygments_inject_css": true,
/*
Name of the Pygments style to inject. Available styles are the styles provided by pygments
plus "github" and "github2014".
*/
"pygments_style": "github",
/*
This is the class to prepend to the pygments CSS styles. Make sure it matches whatever class(es)
you've specified in the extension that controls Pygments highlighting. CodeHilite's default is
"codehilite".
*/
"pygments_css_class": "codehilite",
/*
Markdown extension configuration.
To specify a function in this JSON configuration, create an object with the key "!!python/name"
and set it to the import path to the function "module.submodule.etc.function".
*/
"markdown_extensions": [
// Python Markdown Extra with SuperFences.
// You can't include "extra" and "superfences"
// as "fenced_code" can not be included with "superfences",
// so we include the pieces separately.
"markdown.extensions.footnotes",
"markdown.extensions.attr_list",
"markdown.extensions.def_list",
"markdown.extensions.tables",
"markdown.extensions.abbr",
"pymdownx.betterem",
{
"markdown.extensions.codehilite": {
"guess_lang": false
}
},
// Extra's Markdown parsing in raw HTML cannot be
// included by itself, but "pymdownx" exposes it so we can.
"pymdownx.extrarawhtml",
// More default Python Markdown extensions
{
"markdown.extensions.toc":
{
"permalink": "\ue157"
}
},
"markdown.extensions.meta",
"markdown.extensions.sane_lists",
"markdown.extensions.smarty",
"markdown.extensions.wikilinks",
"markdown.extensions.admonition",
// PyMdown extensions that help give a GitHub-ish feel
{
"pymdownx.superfences": { // Nested fences and UML support
"custom_fences": [
{
"name": "flow",
"class": "uml-flowchart",
"format": {"!!python/name": "pymdownx.superfences.fence_code_format"}
},
{
"name": "sequence",
"class": "uml-sequence-diagram",
"format": {"!!python/name": "pymdownx.superfences.fence_code_format"}
}
]
}
},
{
"pymdownx.magiclink": { // Auto linkify URLs and email addresses
"repo_url_shortener": true,
"repo_url_shorthand": true
}
},
"pymdownx.tasklist", // Task lists
{
"pymdownx.tilde": { // Provide ~~delete~~
"subscript": false
}
},
{
"pymdownx.emoji": { // Provide GitHub's emojis
"emoji_index": {"!!python/name": "pymdownx.emoji.gemoji"},
"emoji_generator": {"!!python/name": "pymdownx.emoji.to_png"},
"alt": "short",
"options": {
"attributes": {
"align": "absmiddle",
"height": "20px",
"width": "20px"
},
"image_path": "https://github.githubassets.com/images/icons/emoji/unicode/",
"non_standard_image_path": "https://github.githubassets.com/images/icons/emoji/"
}
}
},
{
"pymdownx.arithmatex": { // Necessary for MathJax
"generic": true
}
}
],
/*
Enabled parsers for the parser "select parser" command
Available parsers: markdown, github, gitlab
When there are more than one parser in the list, Sublime will prompt
via the quick panel for which one to use. If there is only one, it
will automatically run that parser.
*/
"enabled_parsers": ["markdown", "github", "gitlab"],
/*
Custom external markdown parsers.
"markdown_binary_map" contains key values pairs. The key
is name of the parser and what is used in "enabled_parsers"
to turn on the access to the parser. The value is an array
containing the path to the binary and all the parameters that
are desired.
Multimarkdown is provided as an example below. It's path may differ
on your system.
*/
"markdown_binary_map": {
"multimarkdown": ["/usr/local/bin/multimarkdown"]
},
/*
Default mode for the github Markdown parser : markdown (documents) or gfm (comments)
see http://developer.github.com/v3/markdown/#render-an-arbitrary-markdown-document
*/
"github_mode": "markdown",
/*
Default mode for the gitlab Markdown parser : markdown (documents) or gfm (comments)
see https://docs.gitlab.com/ee/api/markdown.html#render-an-arbitrary-markdown-document
*/
"gitlab_mode": "gfm",
/*
Enables a post process to inject header ids to ensure hrefs to headers work
*/
"github_inject_header_ids": false,
/*
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.
*/
// "github_oauth_token": "secret",
/*
Uses a personal token when parsing markdown with GitLab API. To create one for Markdown Preview, see https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html.
Warn: this secret *must not be shared* with anyone and at least you should create it with minimal scopes for security reasons.
*/
// "gitlab_personal_token": "secret",
/*
Sets the default css file to embed in the HTML
default - Use the builtin CSS or github/gitlab CSS, depending on parser config (markdown.css, github.css or gitlab.css)
other - Set an absolute path or url to any css file
Should be an array, but will take a single string to support legacy convention.
*/
"css": {
"markdown": ["default"],
"github": ["default"],
"gitlab": ["default"]
},
/*
Allow CSS overrides
true - Any file with matching a .markdown_filetype extension with .css will be loaded as an override
false - Matching files ignored
*/
"allow_css_overrides": true,
/*
Specify a HTML template file to render your markdown within.
Available place holders in HTML template:
{{ HEAD }} - would be replaced by generated stylesheets, javascripts enabled above
{{ BODY }} - would be replaced by HTML converted from markdown
Remove "default" from "css" setting to avoid injecting the default CSS if desired.
Refer to 'customized-template-sample.html' as a show case.
*/
"html_template": "",
/*
Sets the JavaScript files to embed in the HTML
Set an array of URLs or filepaths to JavaScript files. Absolute filepaths will be loaded
into the script tag; others will be set as the `src` attribute. The order of files in the
array is the order in which they are embedded.
default - Use the builtin javascripts or github/gitlab javascripts, depending on parser config
other - Set an absolute path or url to any javascripts file
Should be an array, but will take a single string to stay consistent with "css".
*/
"js": [
/*
MathJax CND
*/
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js",
"res://MarkdownPreview/js/math_config.js",
],
/*
Sets syntax highlighting theme for blocks of code.
Currently, one of "white" (default), "dark", "solarized-dark", "solarized-light", and, "monokai".
*/
"gitlab_highlight_theme": "white",
/*
Enable auto-reloaded on save. Will not work if GitHub parser or GitLab parser is used without oauth key specified.
*/
"enable_autoreload": true,
/*
Sets the supported filetypes for auto-reload on save
*/
"markdown_filetypes": [".md", ".markdown", ".mdown"],
/*
Sets a custom temporary folder for MarkdownPreview-generated HTML files. Useful if you're
using LiveReload and don't want to use the OS default. The directory will be created if it
doesn't exist. Relative paths are supported, and are checked against `os.path.isabs`, see
doc: http://docs.python.org/3/library/os.path.html#os.path.isabs
Examples: /tmp/custom_folder (Linux/OSX - absolute path)
C:/TEMP/MYNOTES
C:\\TEMP\\MYNOTES (Windows - absolute path, forward slash or escaped back slash)
build (All OS - relative path, current dir)
../build (Linux/OSX - relative path, in parent dir)
..\\build (Windows - relative path, in parent dir)
*/
"path_tempfile": "",
/*
Sets HTML output to a simple form:
- No head
- No body tags
- ids, classes, and style are stripped out
- Just bare minimum HTML tags and attributes
- extension modifications included
*/
"html_simple": false,
/*
Sets how image paths are handled.
Setting is a string value: (absolute | relative | base64 | none)
absolute: converts relative local paths to absolute
relative: converts relative local paths to a path relative to the
HTML output
base64: coverts the local file to base64 and embeds it in the HTML
none: does nothing
*/
"image_path_conversion": "absolute",
/*
Sets how file paths are handled.
Setting is a string value: (absolute | relative | none)
absolute: converts relative local paths to absolute
relative: converts relative local paths to a path relative to the
HTML output
none: does nothing
*/
"file_path_conversions": "absolute",
/*
Sets how multimarkdown critic marks are handled.
Setting is a string value: (accept | reject | none)
accept: Accepts the proposed inserts and deletions (comments etc. are discarded)
reject: Rejects the proposed inserts and deletions (comments etc. are discarded)
none: does nothing
Critic marks only affects "github" and "markdown" (Python Markdown).
*/
"strip_critic_marks": "none",
/*
Strips the YAML front matter header and converts title to a heading
*/
"strip_yaml_front_matter": true,
/* do we show the panel when building with CMD+B */
"show_panel_on_build": true,
/* do we include the CSS when outputting HTML? */
"include_head": ["build", "browser", "sublime", "clipboard", "save"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.