crossnote 0.9.32 → 0.9.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,248 +81,11 @@ main();
81
81
 
82
82
  ## Notebook Configuration
83
83
 
84
- [Visit here to see the documentation.](https://shd101wyy.github.io/crossnote/interfaces/NotebookConfig.html)
85
-
86
- ```js
87
- const config = {
88
- // File of extensions to be included in the notebook
89
- markdownFileExtensions: [".md", ".markdown", ".mdown", ".mkdn", ".mkd", ".rmd", ".qmd", ".mdx"],
90
-
91
- // The content to be included in HTML `<head>` tag.
92
- // This is useful for adding custom styles or scripts.
93
- includeInHeader: "",
94
-
95
- // Markdown parser to use for rendering.
96
- // Options: 'markdown-it' (default), 'pandoc', 'markdown_yo'
97
- // - 'markdown-it': built-in markdown-it renderer
98
- // - 'pandoc': render via Pandoc (requires Pandoc installed)
99
- // - 'markdown_yo': high-performance renderer (see below); markdown-it is
100
- // still used for token-based operations (backlink extraction, etc.)
101
- markdownParser: 'markdown-it',
102
-
103
- // Path to the markdown_yo native binary.
104
- // When set and markdownParser is 'markdown_yo', crossnote invokes this binary
105
- // (via stdin/stdout) instead of the bundled WASM module.
106
- // See the "markdown_yo" section below for performance guidance.
107
- // Supports $HOME and ~ variable substitution. Default: '' (use WASM).
108
- markdownYoBinaryPath: '',
109
-
110
- // In Markdown, a single newline character doesn't cause a line break in the generated HTML. In GitHub Flavored Markdown, that is not true. Enable this config option to insert line breaks in rendered HTML for single newlines in Markdown source.
111
- breakOnSingleNewLine: true,
112
-
113
- // Whether to enable preview zen mode.
114
- // Enable this option will hide unnecessary UI elements in preview unless your mouse is over it.
115
- enablePreviewZenMode: boolean;
116
-
117
- // Enable smartypants and other sweet transforms.
118
- enableTypographer: false,
119
-
120
- // Enable conversion of URL-like text to links in the markdown preview.
121
- enableLinkify: true,
122
-
123
- // Math
124
- mathRenderingOption: "KaTeX", // "KaTeX" | "MathJax" | "None"
125
- mathInlineDelimiters: [["$", "$"], ["\\(", "\\)"]],
126
- mathBlockDelimiters: [["$$", "$$"], ["\\[", "\\]"]],
127
- mathRenderingOnLineService: "https://latex.codecogs.com/gif.latex", // "https://latex.codecogs.com/svg.latex", "https://latex.codecogs.com/png.latex"
128
- mathjaxScriptSrc: 'https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js',
129
-
130
- // Enable Wiki Link syntax support. More information can be found a https://help.github.com/articles/adding-links-to-wikis/
131
- enableWikiLinkSyntax: true,
132
- // If checked, we use GitHub style piped wiki links, i.e. [[linkText|wikiLink]]. Otherwise, we use
133
- // [[wikiLink|linkText]] as the original Wikipedia style.
134
- useGitHubStylePipedLink: true
135
-
136
- // Enable emoji & font-awesome plugin. This only works for markdown-it parser, but not pandoc parser.
137
- enableEmojiSyntax: true
138
-
139
- // Enable extended table syntax to support merging table cells.
140
- enableExtendedTableSyntax: false
141
-
142
- // Enable CriticMarkup syntax. Only works with markdown-it parser.
143
- // Please check http://criticmarkup.com/users-guide.php for more information.
144
- enableCriticMarkupSyntax: false
145
-
146
- // Enable Obsidian-style #tag syntax in body text.
147
- // Renders `#tag-name` (and nested `#parent/child`) as clickable
148
- // pill-shaped anchors that emit a `clickTag` postMessage when clicked,
149
- // so the host extension can route to a tag-specific search/backlinks
150
- // panel. Tags inside code spans, fenced code blocks, URL fragments,
151
- // and `{...}` block-attribute spans are skipped.
152
- enableTagSyntax: true,
153
-
154
- // When true, the right-click context menu in the preview inherits the
155
- // VS Code theme (colours, font, border) instead of using the default
156
- // Contexify dark/light theme. Only takes effect when running inside
157
- // a VS Code webview (the rule is gated on body.vscode-* classes).
158
- useVSCodeThemeForContextMenu: false,
159
-
160
- // Front matter rendering option
161
- frontMatterRenderingOption: 'none', // 'none' | 'table' | 'code block'
162
-
163
- // Mermaid theme
164
- mermaidTheme: 'default', // 'default' | 'dark' | 'forest'
165
-
166
- // Code Block theme
167
- // If `auto.css` is chosen, then the code block theme that best matches the current preview theme will be picked.
168
- codeBlockTheme: 'auto.css',
169
- // "auto.css",
170
- // "default.css",
171
- // "atom-dark.css",
172
- // "atom-light.css",
173
- // "atom-material.css",
174
- // "coy.css",
175
- // "darcula.css",
176
- // "dark.css",
177
- // "funky.css",
178
- // "github.css",
179
- // "github-dark.css"
180
- // "hopscotch.css",
181
- // "monokai.css",
182
- // "okaidia.css",
183
- // "one-dark.css",
184
- // "one-light.css",
185
- // "pen-paper-coffee.css",
186
- // "pojoaque.css",
187
- // "solarized-dark.css",
188
- // "solarized-light.css",
189
- // "twilight.css",
190
- // "vue.css",
191
- // "vs.css",
192
- // "xonokai.css"
193
-
194
- // Preview theme
195
- previewTheme: 'github-light.css',
196
- // "atom-dark.css",
197
- // "atom-light.css",
198
- // "atom-material.css",
199
- // "github-dark.css",
200
- // "github-light.css",
201
- // "gothic.css",
202
- // "medium.css",
203
- // "monokai.css",
204
- // "newsprint.css",
205
- // "night.css",
206
- // "none.css",
207
- // "one-dark.css",
208
- // "one-light.css",
209
- // "solarized-dark.css",
210
- // "solarized-light.css",
211
- // "vue.css"
212
-
213
- // Revealjs presentation theme
214
- revealjsTheme: "white.css",
215
- // "beige.css",
216
- // "black.css",
217
- // "blood.css",
218
- // "league.css",
219
- // "moon.css",
220
- // "night.css",
221
- // "serif.css",
222
- // "simple.css",
223
- // "sky.css",
224
- // "solarized.css",
225
- // "white.css",
226
- // "none.css"
227
-
228
- // Accepted protocols for links.
229
- protocolsWhiteList: "http://, https://, atom://, file://, mailto:, tel:",
230
-
231
- // When using Image Helper to copy images, by default images will be copied to root image folder path '/assets'
232
- imageFolderPath: '/assets',
233
-
234
- // Whether to print background for file export or not. If set to `false`, then `github-light` preview theme will b used. You can also set `print_background` in front-matter for individual files.
235
- printBackground: false,
236
-
237
- // Chrome executable path, which is used for Puppeteer export. Leaving it empty means the path will be found automatically.
238
- chromePath: '',
239
-
240
- // ImageMagick command line path. Should be either `magick` or `convert`.
241
- // Leaving it empty we will use `sharp` instead.
242
- imageMagickPath: '',
243
-
244
- // Pandoc executable path
245
- pandocPath: 'pandoc',
246
-
247
- // Pandoc markdown flavor
248
- pandocMarkdownFlavor: "markdown-raw_tex+tex_math_single_backslash",
249
-
250
- // Pandoc arguments e.g. ['--smart', '--filter=/bin/exe']. Please use long argument names.
251
- pandocArguments: [],
252
-
253
- // Default latex engine for Pandoc export and latex code chunk.
254
- latexEngine: 'pdflatex',
255
-
256
- // Enables executing code chunks and importing javascript files.
257
- // This enables also the sidebar table of content.
258
- // ⚠ ️ Please use this feature with caution because it may put your security at risk!
259
- // Your machine can get hacked if someone makes you open a markdown with malicious code while script execution is enabled.
260
- enableScriptExecution: false,
261
-
262
- // Enables transform audio video link to to html5 embed audio video tags.
263
- // Internally it enables markdown-it-html5-embed plugins.
264
- enableHTML5Embed: false,
265
-
266
- // Enables video/audio embed with ![]() syntax (default).
267
- HTML5EmbedUseImageSyntax: true,
268
-
269
- // Enables video/audio embed with []() syntax.
270
- HTML5EmbedUseLinkSyntax: false,
271
-
272
- // When true embed media with http:// schema in URLs. When false ignore and don't embed them.
273
- HTML5EmbedIsAllowedHttp: false,
274
-
275
- // HTML attributes to pass to audio tags.
276
- HTML5EmbedAudioAttributes: 'controls preload="metadata" width="320"',
277
-
278
- // HTML attributes to pass to video tags.
279
- HTML5EmbedVideoAttributes: 'controls preload="metadata" width="320" height="240"',
280
-
281
- // Puppeteer waits for a certain timeout in milliseconds before the document export.
282
- puppeteerWaitForTimeout: 0,
283
-
284
- // Args passed to puppeteer.launch({args: $puppeteerArgs})
285
- puppeteerArgs: [],
286
-
287
- // Render using PlantUML server instead of binary. Leave it empty to use the plantuml.jar file at `plantumlJarPath` (`java` is required in system path). Eg: "http://localhost:8080/svg/".
288
- // You run start a plantuml server by running:
289
- // $ docker run -d -p 8080:8080 plantuml/plantuml-server:jetty
290
- plantumlServer: "http://localhost:8080/svg/",
291
-
292
- // The absolute of the PlantUML jar file.
293
- // The plantuml.jar file could be downloaded from https://sourceforge.net/projects/plantuml/
294
- plantumlJarPath: "",
295
-
296
- // Example values:
297
- // - cdn.jsdelivr.net
298
- // - fastly.jsdelivr.net
299
- // - gcore.jsdelivr.net
300
- // - testingcf.jsdelivr.net
301
- jsdelivrCdnHost: "cdn.jsdelivr.net",
302
-
303
- // Kroki server url.
304
- krokiServer: "https://kroki.io",
305
-
306
- // The WebSequenceDiagrams server URL.
307
- webSequenceDiagramsServer: "https://www.websequencediagrams.com";
308
-
309
- // API key for WebSequenceDiagrams. Required for wider diagram sizes.
310
- webSequenceDiagramsApiKey: "";
311
-
312
- // Always show backlinks in the preview.
313
- alwaysShowBacklinksInPreview: false,
314
-
315
- // Maximum size (in bytes) of a markdown file that crossnote will
316
- // load into the in-memory note index. Files larger than this are
317
- // skipped during `refreshNotes` so a checked-in 50 MB log / data
318
- // dump with a `.md` extension can't pin its full content (plus a
319
- // markdown-it token tree several × that size) in memory. Files
320
- // above the cap are still openable by wikilink click — they're
321
- // just not indexed for autocomplete, backlinks, or the tag panel.
322
- // Set to 0 to disable the cap entirely.
323
- maxNoteFileSize: 5_242_880, // 5 MiB
324
- }
325
- ```
84
+ All notebook configuration options — types, defaults, and per-field documentation — live in the API reference:
85
+
86
+ 👉 [NotebookConfig](https://shd101wyy.github.io/crossnote/interfaces/NotebookConfig.html)
87
+
88
+ The snippet in the [Example](#example) section above shows the commonly used options (`previewTheme`, `codeBlockTheme`, `mathRenderingOption`, `printBackground`, `enableScriptExecution`, `chromePath`, ...).
326
89
 
327
90
  ## Notebook Local Configuration
328
91