|
1 | 1 | 
|
2 | 2 |
|
3 |
| -# New MarkDown [BETA] |
| 3 | +# New MarkDown |
4 | 4 |
|
5 | 5 | **New way to write in markdown**
|
6 | 6 |
|
7 |
| -[](LICENSE) |
8 |
| -[](CHANGELOG.md) |
9 |
| - |
10 | 7 | NMD stands for **New MarkDown**, or for friends, *Nicola MarkDown* (if Stephen Bourne can name a shell, why can't I name mine NMD?)
|
11 | 8 |
|
12 |
| -- [New MarkDown \[BETA\]](#new-markdown-beta) |
13 |
| - - [Overview](#overview) |
14 |
| - - [Why NMD?](#why-nmd) |
15 |
| - - [Performance](#performance) |
16 |
| - - [Extended Syntax](#extended-syntax) |
17 |
| - - [Order with Integrated Dossiers](#order-with-integrated-dossiers) |
18 |
| - - [Predefined Styles and Customization](#predefined-styles-and-customization) |
19 |
| - - [Cool Factor](#cool-factor) |
20 |
| - - [NMD x VS Code](#nmd-x-vs-code) |
21 |
| - - [Getting Started](#getting-started) |
22 |
| - - [TL;DR](#tldr) |
23 |
| - - [Installation](#installation) |
24 |
| - - [NMD CLI](#nmd-cli) |
25 |
| - - [Generate a new dossier](#generate-a-new-dossier) |
26 |
| - - [Markdown to New Markdown](#markdown-to-new-markdown) |
27 |
| - - [Add a new document](#add-a-new-document) |
28 |
| - - [Reset dossier configuration](#reset-dossier-configuration) |
29 |
| - - [Compile](#compile) |
30 |
| - - [Develop](#develop) |
31 |
| - - [NMD Syntax](#nmd-syntax) |
32 |
| - - [Author](#author) |
33 |
| - - [Contributing](#contributing) |
34 |
| - - [License](#license) |
35 |
| - |
| 9 | +> [!IMPORTANT] |
| 10 | +> **TL;DR**: download [last NMD CLI tool](#nmd-command-line-interface). |
36 | 11 |
|
37 | 12 | ## Overview
|
38 | 13 |
|
@@ -78,128 +53,21 @@ Keep your documents organized with integrated "dossiers" for more intuitive and
|
78 | 53 | Why stick to Markdown when you can be cool using **NMD**?
|
79 | 54 |
|
80 | 55 |
|
81 |
| -## NMD x VS Code |
82 |
| - |
83 |
| -You can use the official [NMD x VS Code](https://github.com/nricciardi/nmd-vscode) extension! |
| 56 | +## Syntax |
84 | 57 |
|
| 58 | +You can find the current NMD's syntax to build nmd documents go to this [link](https://github.com/nricciardi/nmd-core/blob/main/NMD.md). |
85 | 59 |
|
86 |
| -## Getting Started |
| 60 | +## NMD command line interface |
87 | 61 |
|
88 |
| -Do you want **migrate from Markdown to New Markdown** easily and quickly? Read [how to do that](#markdown-to-new-markdown) using CLI! |
89 |
| - |
90 |
| -### TL;DR |
| 62 | +You can download last release of **NMD command line interface** [here](https://github.com/nricciardi/nmd-cli/releases) or download it through [Cargo](https://github.com/rust-lang/cargo): |
91 | 63 |
|
92 | 64 | ```shell
|
93 | 65 | cargo install nmd
|
94 |
| - |
95 |
| -nmd generate dossier -p dossier/input/path -f -w |
96 |
| - |
97 |
| -nmd dossier -p dossier/input/path add -d new-document.nmd |
98 |
| - |
99 |
| -nmd compile dossier -i dossier/input/path |
100 |
| -``` |
101 |
| - |
102 |
| -### Installation |
103 |
| - |
104 |
| -You can install NMD using Cargo or downloading last release from Github. |
105 |
| - |
106 |
| -```shell |
107 |
| -cargo install nmd |
108 |
| -``` |
109 |
| - |
110 |
| -### NMD CLI |
111 |
| - |
112 |
| -#### Generate a new dossier |
113 |
| - |
114 |
| -To **generate a new dossier** you can use the following command: |
115 |
| - |
116 |
| -```shell |
117 |
| -nmd generate dossier -p dossier/input/path |
118 |
| -``` |
119 |
| - |
120 |
| -There are many *flags* that you can use in combination with `generate dossier`. For example, if you want *force* the generation you can use `-f`, or if you want a *welcome page* you can use `-w`. |
121 |
| - |
122 |
| -```shell |
123 |
| -nmd generate dossier -p dossier/input/path -f -w |
124 |
| -``` |
125 |
| - |
126 |
| -The Git support is planned, but not implemented yet. You can only add `.gitkeep` files in assets directories using `-k`. |
127 |
| - |
128 |
| -`-n` permits to specify dossier name. |
129 |
| - |
130 |
| -##### Markdown to New Markdown |
131 |
| - |
132 |
| -You can easily convert a standard Markdown file in a New Markdown dossier using `--from-md <md-file-path>` option. |
133 |
| - |
134 |
| -##### Add a new document |
135 |
| - |
136 |
| -To **add a new document** you can use the following command: |
137 |
| - |
138 |
| -```shell |
139 |
| -nmd dossier -p dossier/input/path add -d new-document.nmd |
140 | 66 | ```
|
141 | 67 |
|
142 |
| -If the document name doesn't have `nmd` extension, it will be added automatically. |
143 |
| - |
144 |
| -You can add more than one document at the same time: |
145 |
| - |
146 |
| -```shell |
147 |
| -nmd dossier -p dossier/input/path add -d new-document-1.nmd -d new-document-2.nmd -d new-document-3.nmd |
148 |
| -``` |
149 |
| - |
150 |
| -##### Reset dossier configuration |
151 |
| - |
152 |
| -```shell |
153 |
| -nmd dossier -p dossier/input/path reset [ -p ] |
154 |
| -``` |
155 |
| - |
156 |
| -`-p` reset flag to preserve documents list. |
157 |
| - |
158 |
| -#### Compile |
159 |
| - |
160 |
| -You can compile a dossier or a single file through `compile` command. |
161 |
| - |
162 |
| -The only mandatory option is the input path. It can be a path to a directory (dossier) or a file. |
163 |
| - |
164 |
| -```shell |
165 |
| -nmd compile -i input/path |
166 |
| -``` |
167 |
| - |
168 |
| -`compile` command has a lot of options. You could specify the output format using `-f <format>` (e.g. `html`, which is the default), the output path with `-o <output-path>` or the theme using `-t <theme>`. The available themes are: |
169 |
| - |
170 |
| -- `light` |
171 |
| -- `dark` |
172 |
| -- `vintage` |
173 |
| -- `scientific` |
174 |
| -- `none` |
175 |
| - |
176 |
| - |
177 |
| -```shell |
178 |
| -nmd compile -f html dossier -i dossier/input/path -o artifact/output/path |
179 |
| -``` |
180 |
| - |
181 |
| -Moreover, if you watch dossier files and compile them if something changes, you should use watcher mode (`-w` option). Watcher mode compile dossier if any change is captured. Changes are captured only if a minimum time is elapsed. To set minimum time use `--watcher-time` option. |
182 |
| - |
183 |
| -`--fast-draft` to create a fast draft of dossier, generally compiler takes less time to generate it. |
184 |
| - |
185 |
| -`--parallelization` to parallelize work (default is single thread). |
186 |
| - |
187 |
| -`-s <document1> -s <documentN>` to compile only a subset of documents in dossier configuration list. |
188 |
| - |
189 |
| -In the end, if you are writing in NMD and you want a preview, you could compile with `-p` option. `-p` renders a preview in a web server on `127.0.0.1:1234` (`--preview-scraping-interval <interval>` to set client scraping interval in *milliseconds*). |
190 |
| - |
191 |
| -`--embed-local-image`, `--embed-remote-image`, `--strict-image-src-check` and `--embed-local-image` to manage images parsing. |
192 |
| - |
193 |
| -## Develop |
194 |
| - |
195 |
| -Develop [check list](DEVELOP.md) |
196 |
| - |
197 |
| -## NMD Syntax |
198 |
| - |
199 |
| -[NMD Syntax](NMD.md) |
| 68 | +## NMD x VS Code |
200 | 69 |
|
201 |
| -> [!WARNING] |
202 |
| -> NMD syntax is working in progress yet, you can contribute following [contribution guidelines](CONTRIBUTING.md)! |
| 70 | +You can use the official [NMD x VS Code](https://github.com/nricciardi/nmd-vscode) extension! |
203 | 71 |
|
204 | 72 |
|
205 | 73 | ## Author
|
|
0 commit comments