-
-
Notifications
You must be signed in to change notification settings - Fork 46
Settings
A basic set of settings are available in Settings page: cmd-,
-> Packages
-> Markdown-Writer
-> Settings
.
If you do not see any settings (due to a Atom's bug), please activate Markdown-Writer using command (e.g. Open Cheat Sheet). Then close and reopen the Settings page.
Refer to Settings for Front Matters on how to configure URLs to categories/posts/tags definitions.
Markdown-Writer provides additional set of customisations (full list) to overwrite the default behaviours.
Go to menu Atom
-> Config...
, find or add "markdown-writer":
key and append the configurations under it.
"*": # the first line you see in config.cson
"...": # other plugins installed
"markdown-writer":
siteEngine: "jekyll" # add any additional configurations here, with indentation
Open your project in Atom, trigger command Markdown Writer: Create Project Configs
. This will create a _mdwriter.cson
file under your project/blog root, with all the default settings.
Edit any settings, then run command Window: Reload
or use menu: View -> Developer -> Reload Window
to source the changes.
If you want to fallback some settings to your global configs, remember to delete those settings.
Read this config file for an example.
'markdown-writer':
'frontMatter': """
layout: "custom-layout"
title: "<title>"
date: "<date>"
---
"""
'markdown-writer':
'textStyles':
'italic': 'before': "*", 'after': "*"
'markdown-writer':
'imageTag': "{% img <align> <src> <width> <height> '{alt}' %}"
To enable different unordered list styles at different indentation, E.g.
- Indentation 0
* Indentation 1
+ Indentation 2
Add config:
'markdown-writer':
templateVariables:
ulBullet0: "-" # indentation = 0
ulBullet1: "*" # indentation = 1
ulBullet2: "+" # indentation = 2
To use unordered list styles at the second indentation, E.g.
1. Indentation 0
- Indentation 1
Add config:
'markdown-writer':
templateVariables:
olBullet1: "-"
To use 1.
as the ordered list style, E.g.
1. First Point
1. Second Point
1. Third Point
1. The default is auto-increment
2. You can use command `Correct Ordered List Numbers`
3. To correct the numbers
Add config:
'markdown-writer':
# use 1. when press enter
orderedNewLineNumberContinuation: false
# use 1. when change a list to ordered list
lineStyles:
ol:
before: "1. "
regexMatchBefore: "(?:\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s"
regexBefore: "(?:-|\\*|\\+|\\.|\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s"
Put under current file's directory/images/file-name/*.jpg
'markdown-writer':
siteImagesDir: "{directory}/images/{slug}/"
Refer to issue. Use config:
'markdown-writer':
sitePostsDir: "posts/"
newPostFileName: "{slug}/index.md"
siteImagesDir: "{directory}/assets/"