| 1 | # Install |
| 2 | |
| 3 | ### This is a stub page! |
| 4 | |
| 5 | There are two ways to use Marp, through a command-line interface (**[Marp CLI][marp cli]**) or through a graphical user interface (**[VS Code extension][marp for vs code]**). To start authoring presentations, you must install either the CLI or the VS Code extension. |
| 6 | |
| 7 | ## Should I use the Marp CLI or Marp for VS Code? |
| 8 | |
| 9 | ### Basic Comparison |
| 10 | |
| 11 | | | Marp for VS Code | Marp CLI | |
| 12 | | ----------------: | :--------------: | :----------: | |
| 13 | | Editor | VS Code | Any editor | |
| 14 | | Live Preview | Yes | Yes | |
| 15 | | Export Method | Click to export | Command Line | |
| 16 | | Use Marp plugins? | No | Yes | |
| 17 | |
| 18 | ### Marp for VS Code |
| 19 | |
| 20 | If you are not familiar with the command line, use the VS Code extension without hesitation! All of the basic Marp features are available in Marp for VS Code. |
| 21 | |
| 22 | Even if you are CLI savvy, you may prefer to author presentations through Marp for VS Code. VS Code has many convenient features for authoring a slide deck, including Marp syntax completion and live preview. |
| 23 | |
| 24 | ### Marp CLI |
| 25 | |
| 26 | Using Marp CLI is suited for following: |
| 27 | |
| 28 | - Authoring Markdown and theme CSS with your favorite editor (such as vim) |
| 29 | - Batch processing |
| 30 | - Combination with other tools (through piping and redirection) |
| 31 | - Continuous Integration (CI) |
| 32 | - Server-side conversion |
| 33 | - Set advanced configuration of Marp |
| 34 | - Use Marp in Node.js project |
| 35 | - Use Marp / Marpit / markdown-it plugins |
| 36 | - Use the other Marpit flavored engine |
| 37 | |
| 38 | ## Installing [Marp for VS Code] |
| 39 | |
| 40 | 1. Install [Visual Studio Code]. |
| 41 | 2. Install the [Marp for VS Code] extension. |
| 42 | 3. Create and open a new Markdown file (with `.md` extension). |
| 43 | 4. Select the `Toggle Marp feature for current Markdown` command from the Marp icon in editor actions (toolbar). This command will add Marp to the front-matter of your Markdown file: |
| 44 | ```markdown |
| 45 | --- |
| 46 | marp: true |
| 47 | --- |
| 48 | ``` |
| 49 | 5. Open VS Code Markdown preview, and start writing your presentation! |
| 50 | |
| 51 | [visual studio code]: https://code.visualstudio.com/ |
| 52 | [marp for vs code]: https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode |
| 53 | |
| 54 | ## Installing [Marp CLI] |
| 55 | |
| 56 | [marp cli]: https://github.com/marp-team/marp-cli |
| 57 | |
| 58 | ### [Homebrew](https://brew.sh/) (macOS) |
| 59 | |
| 60 | ```bash |
| 61 | brew install marp-cli |
| 62 | ``` |
| 63 | |
| 64 | ### [Scoop](https://scoop.sh/) (Windows) |
| 65 | |
| 66 | ```bash |
| 67 | scoop install marp |
| 68 | ``` |
| 69 | |
| 70 | ### [Node.js](https://nodejs.org/) |
| 71 | |
| 72 | If you have installed Node.js >= 12, you can try one-shot conversion without installing powered by `npx` (`npm exec`). |
| 73 | |
| 74 | ```bash |
| 75 | npx @marp-team/marp-cli@latest markdown.md |
| 76 | ``` |
| 77 | |
| 78 | #### Install to Node project |
| 79 | |
| 80 | ```bash |
| 81 | npm install --save-dev @marp-team/marp-cli |
| 82 | npx marp markdown.md |
| 83 | ``` |
| 84 | |
| 85 | ```bash |
| 86 | yarn add --dev @marp-team/marp-cli |
| 87 | yarn exec markdown.md |
| 88 | ``` |
| 89 | |
| 90 | [You can also install the `marp` command globally](https://github.com/marp-team/marp-cli#global-installation), but it is _not recommended_. |
| 91 | |
| 92 | #### Standalone binary |
| 93 | |
| 94 | [➡️ Download the latest standalone binary from the GitHub release page...][standalone binary] |
| 95 | |
| 96 | [standalone binary]: https://github.com/marp-team/marp-cli/releases |
| 97 | |
| 98 | #### Docker |
| 99 | |
| 100 | [➡️ Check out the overview of an official container in Docker Hub...][docker] |
| 101 | |
| 102 | [docker]: https://hub.docker.com/r/marpteam/marp-cli/ |
| 103 |