-
Notifications
You must be signed in to change notification settings - Fork 0
/
_mdwriter.cson
254 lines (234 loc) · 8.69 KB
/
_mdwriter.cson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# Markdown-Writer for Atom
# https://atom.io/packages/markdown-writer
#
# To find latest and default configurations, refer to:
# https://github.com/zhuochun/md-writer/blob/master/lib/config.cson
#
# Examples: https://github.com/zhuochun/md-writer/wiki/Settings#example-customizations
#
# NOTE 1: After edit, please run command `Window: Reload` or
# Use menu: View -> Developer -> Reload Window.
# NOTE 2: Strings need to be quoted.
#
# Static engine of your blog
# - One of: general, html, jekyll, octopress, hexo
siteEngine: "general"
# Website URL of your blog
siteUrl: "https://thewismit.com"
# Root directory to your blog
# - Leave it empty to use the current project path (recommended)
siteLocalDir: ""
# Directory to drafts from siteLocalDir
siteDraftsDir: "_drafts/"
# Directory to posts from siteLocalDir
sitePostsDir: "_posts/{year}/"
# Directory to images from siteLocalDir
# - E.g. to use the current filename directory, can use {directory}
siteImagesDir: "images/{year}/{month}/"
# URLs to tags/posts/categories JSON files
# https://github.com/zhuochun/md-writer/wiki/Settings-for-Front-Matters
urlForPosts: ""
urlForTags: ""
urlForCategories: ""
# The front matter key name
frontMatterNameTags: "tags"
frontMatterNameCategories: "categories"
# Filename format of new drafts created
newDraftFileName: "{slug}{extension}"
# Filename format of new posts created
newPostFileName: "{year}-{month}-{day}-{slug}{extension}"
# Front matter add custom fields
# - Configured as a key-value pair (fieldName: defaultValue)
# - Referenced by fieldName
# frontMatterCustomFields:
# author: "Your Name Here"
# Front matter date format, determines the {date} in frontMatter
frontMatterDate: "{year}-{month}-{day} {hour}:{minute}"
# Front matter template
frontMatter: """
---
layout: "{layout}"
title: "{title}"
date: "{date}"
header: "{title}"
description: ""
permalink: /{slug}/
---
"""
# File extension of posts/drafts
fileExtension: ".md"
# File slug separator
slugSeparator: "-"
# Rename filename based on title in front matter when publishing
publishRenameBasedOnTitle: true
# Publish keep draft's extension name used
publishKeepFileExtname: false
# Table of content (TOC) default options
toc:
# Depth from/to, Number between 1-6
depthFrom: 1
depthTo: 6
# Insert anchor link
insertAnchor: true
# Chose Anchor method, one of: "github.com", "bitbucket.org", "ghost.org", "gitlab.com"
anchorMode: "github.com"
# List continuation in the middle of line
# - Enable to start a new list whenever you press enter in a list
# - Disable to start a new list only when you press enter at the end of a list
inlineNewLineContinuation: false
# Ordered list number continuation
# - Enable to continue numbers from previous number in ordered lists
# - Disable to always use 1. as the number in ordered lists
orderedNewLineNumberContinuation: true
# Table row continuation
# - Enable to auto insert table columns when you press enter in a table row
tableNewLineContinuation: true
# Path to a cson file that stores links added for automatic linking
# - Config is commented so to use the default `markdown-writer-links.cson` file
# under your Atom global config directory
# siteLinkPath: "set/path/to/links.cson"
# Default text range selection, can be overwritten individually in textStyles:
#
# - "nope" (disabled), "nearestWord" (alphanum word, default), "currentWord",
# "currentNonTrailWord" (current word except at the end of a word),
# "currentLine", "currentParagraph"
#
textRangeSelectBy: "nearestWord"
# TextStyles adjust text/word styles
#
# - Use `before` and `after` to define insert characters around the selected text.
# - Use `regex{Before,After}` (optional) to define a regex match of any similar style.
# If this regex is matched, the matched style will be replaced by this style.
#
# NOTE
#
# - DO NOT USE CAPTURE GROUP IN `regex{Before,After}`! Capture group break things,
# use non-capturing group `(?:)` instead.
# - When you modify one style, make sure all configurations for this style are present.
# E.g. when you modify italic.before and italic.after, keep italic.scopeSelector intact.
# - If you don't plan to modify any of these settings, remove them. So the settings
# fallback to defaults and enjoy updates when the package is upgraded.
#
textStyles:
code:
before: "`", after: "`", scopeSelector: ".raw"
math:
before: "$$", after: "$$", scopeSelector: ".math"
bold:
before: "**", after: "**", scopeSelector: ".bold"
italic:
before: "_", after: "_", scopeSelector: ".italic"
keystroke:
before: "<kbd>", after: "</kbd>"
strikethrough:
before: "~~", after: "~~", scopeSelector: ".strike"
codeblock:
before: "```\n"
after: "\n```"
regexBefore: "```(?:[\\w- ]+)?\\r?\\n"
regexAfter: "\\r?\\n```"
selectBy: "currentParagraph"
mathblock:
before: "$$\n"
after: "\n$$"
regexBefore: "\\$\\$\\r?\\n"
regexAfter: "\\r?\\n\\$\\$"
selectBy: "currentParagraph"
deletion:
before: "{--", after: "--}", scopeSelector: "critic."
addition:
before: "{++", after: "++}", scopeSelector: "critic."
substitution:
before: "{~~", after: "~>~~}"
comment:
before: "{>>", after: "<<}", scopeSelector: "critic."
highlight:
before: "{==", after: "==}{>><<}"
# LineStyles adjust line/sentence styles
#
# - Use `before` and `after` to define insert characters around the selected text.
# - Use `regex{Before,After}` (optional) to define a regex match of any similar style.
# If this regex is matched, the matched style will be replaced by this style.
# - Use `regexMatch{Before,After}` (optional) to define an exact match of this style.
# If this regex is matched, this style will be toggled. This config takes the highest
# matching priority.
#
# NOTE
#
# - DO NOT USE CAPTURE GROUP IN `regex{Before,After}`, `regexMatch{Before,After}`!
# Capture group break things, use non-capturing group `(?:)` instead.
# - When you modify one style, make sure all configurations for this style are present.
# E.g. when you modify ul.before, keep ul.regexMatchBefore etc intact.
# - If you don't plan to modify any of these settings, remove them. So the settings
# fallback to defaults and enjoy updates when the package is upgraded.
#
lineStyles:
h1: before: "# "
h2: before: "## "
h3: before: "### "
h4: before: "#### "
h5: before: "##### "
ul:
before: "{ul} "
regexMatchBefore: "(?:-|\\*|\\+|\\.)\\s"
regexBefore: "(?:-|\\*|\\+|\\.|\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s"
removeEmptyLine: true
ol:
before: "{i}. "
regexMatchBefore: "(?:\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s"
regexBefore: "(?:-|\\*|\\+|\\.|\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s"
removeEmptyLine: true
task:
before: "{captureBefore} [ ] "
regexMatchBefore: "(?:-|\\*|\\+|\\d+[\\.\\)])\\s+\\[ ]\\s"
regexBefore: "(-|\\*|\\+|\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s*(?:\\[[xX ]])?\\s"
captureBefore: "ul"
removeEmptyLine: true
taskdone:
before: "{captureBefore} [x] "
regexMatchBefore: "(?:-|\\*|\\+|\\d+[\\.\\)])\\s+\\[[xX]]\\s"
regexBefore: "(-|\\*|\\+|\\d+[\\.\\)]|[a-zA-Z]+[\\.\\)])\\s*(?:\\[[xX ]])?\\s"
captureBefore: "ul"
emptyBefore: "{captureBefore} [ ] "
removeEmptyLine: true
blockquote: before: "> ", beginningOfLine: true
# Image tag template, available variables:
#
# - src: image path in local if copied or same as rawSrc
# - relativeFileSrc: image path relative to your edit file
# - relativeSiteSrc: image path relative to your open project
# - alt: alt text
# - width: width of image
# - height: height of image
# - align: alignment of image
#
imageTag: "![{alt}]({src})"
# Use relative path to image from the opened file
relativeImagePath: false
# Rename copyed image based on title/alt
renameImageOnCopy: false
# Inline link tag template
linkInlineTag: "[{text}]({url})"
# Reference link tag template
referenceInlineTag: "[{text}][{label}]"
referenceDefinitionTag: '{indent}[{label}]: {url} "{title}"'
# Reference link tag insert position: "paragraph", "article"
referenceInsertPosition: "paragraph"
# Reference link tag indent space: 0, 2
referenceIndentLength: 2
# Footnote tag template
footnoteReferenceTag: "[^{label}]"
footnoteDefinitionTag: "[^{label}]: {content}"
# Footnote definition tag insert position: "paragraph", "article"
footnoteInsertPosition: "paragraph"
# Table default alignments: "empty", "left", "right", "center"
tableAlignment: "empty"
# Insert extra pipes at the beginning and the end of table rows
tableExtraPipes: false
# Fold inline links at insertion
foldInlineLinks: false
# Template variables is a key-value map used in template string
templateVariables:
# Bullet for unordered list. add ulBullet1, ulBullet2 if you want different bullet for nested list
# https://github.com/zhuochun/md-writer/wiki/Settings#use-different-unorder-list
ulBullet: "-"