forked from notable/notable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
60 lines (51 loc) · 1.53 KB
/
config.ts
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
/* IMPORT */
import * as path from 'path';
import Settings from './settings';
/* CONFIG */
const Config = {
get cwd () {
return Settings.get ( 'cwd' );
},
attachments: {
get path () {
const cwd = Config.cwd;
return cwd ? path.join ( cwd, 'attachments' ) : undefined;
},
globs: ['**/*', '!**/.*'],
re: /attachments(?:\\|\/)(?!\.).*$/, // Excluding dot files
token: '@attachment' // Usable in urls
},
notes: {
get path () {
const cwd = Config.cwd;
return cwd ? path.join ( cwd, 'notes' ) : undefined;
},
globs: ['**/*.{md,mkd,mdwn,mdown,markdown,markdn,mdtxt,mdtext}'],
re: /\.(?:md|mkd|mdwn|mdown|markdown|markdn|mdtxt|mdtext)$/,
token: '@note' // Usable in urls
},
tags: {
token: '@tag' // Usable in urls
},
sorting: {
by: Settings.get ( 'sorting.by' ),
type: Settings.get ( 'sorting.type' )
},
flags: {
TUTORIAL: true, // Write the tutorial notes upon first instantiation
OPTIMISTIC_RENDERING: true // Assume writes are successful in order to render changes faster
},
katex: {
throwOnError: true,
displayMode: false,
errorColor: "#1500ff",
// showdown converts $$ to ¨D¨D
delimilters: [{ left: "¨D¨D", right: "¨D¨D", display: true,},
{ left: "\\(", right: "\\)", display: false,},
{ left: "\\[", right: "\\]", display: true, },
{ left: '~', right: '~', display: false, asciimath: true },
{ left: '&&', right: '&&', display: true, asciimath: true },]
}
};
/* EXPORT */
export default Config;