UNPKG

3.02 kBMarkdownView Raw
1# eloc
2
3[![npm version][npm-src]][npm-href]
4[![Install size][packagephobia-src]][packagephobia-href]
5[![License][license-src]][license-href]
6
7Eloquence cli. For presenters who (1) focus on writing, (2) present in a concise style.
8
9- Serve markdown as presentation
10- Live editor
11- Static export
12- Print view / Mobile view / Dark mode
13- Customizable with web standard
14
15All of this in a [1MB][packagephobia-href] cli. Check out https://eloc.now.sh
16
17### Presentation in Markdown ABC
18
19Break markdown into slides with `---` (horizontal rule), and that's all. e.g. `slides.md`:
20
21```
22# Hello World
23---
24Brown fox jumps over the lazy dog.
25---
26## Thanks
27```
28
29then `eloc slides.md` gives you:
30
31<p align="center"><img src="https://eloc-screenshot.now.sh" height="420px" /></p>
32
33## Install
34
35```bash
36npm install -g eloc
37```
38
39## Usage
40
41```
42 eloc - Eloquence cli
43
44 Usage
45
46 $ eloc <markdown-file> Serve markdown file as presentation
47 $ eloc open <markdown-file> Open markdown file as presention in browser
48 $ eloc build <markdown-file> Export presentation to directory
49
50 Options
51
52 -p, --port <number> Port (default: 3000)
53 -c, --css <file> External css for customization
54 -i, --include <globs> Files for referencing in markdown
55 -o, --out-dir <dir> Output directory for build (default: public)
56 -t, --title <string> HTML title (default: <markdown-filename>)
57 -b, --progress-bar Enable progress bar
58
59 -q, --quiet Mute verbose logs
60 -v, --version Display version number
61 -h, --help Display usage information
62
63 Examples
64
65 # Serve "deck.md" as presentation
66 $ eloc deck.md
67
68 # Create & open "new-deck.md" as presentation in browser
69 $ eloc open new-deck.md
70
71 # Export presentation with images
72 $ eloc build deck.md --include "*.jpg"
73```
74
75### Customization & Tips
76
77- Use `--css` arg with an external stylesheet, which will be applied on every slide.
78
79- Use inline `<style />` for [per-slide customization](https://eloc.now.sh/#6):
80
81 ```
82 _write style tag within markdown_
83
84 <style>
85 .slide { background: url(...) }
86 .content { filter: invert() }
87 code { opacity: 0.8 }
88 </style>
89 ```
90
91- https://math.now.sh/ is your friend for embedding math equations.
92
93## See Also
94
95- [markdown-deck](https://github.com/amio/markdown-deck): a web component for presenters
96
97## Prior Art
98
99- [mdx-deck](https://github.com/jxnblk/mdx-deck) - If you want to enhance slides with React, this is the one.
100- [slides.com](https://slides.com) - Beautiful and powerful, the final choice for full featured presentation.
101
102[npm-src]: https://badgen.net/npm/v/eloc
103[npm-href]: https://www.npmjs.com/package/eloc
104[coverage-src]: https://badgen.net/codecov/c/github/amio/eloc
105[coverage-href]: https://codecov.io/gh/amio/eloc
106[packagephobia-src]: https://badgen.net/packagephobia/install/eloc
107[packagephobia-href]: https://packagephobia.now.sh/result?p=eloc
108[license-src]: https://badgen.net/badge/license/MIT
109[license-href]: LICENSE.md
110
\No newline at end of file