0.0.72 • Published 10 days ago

remarkableslides v0.0.72

Weekly downloads
-
License
MIT
Repository
github
Last release
10 days ago

remarkableslides

NPM Version NPM Install Size

Make slides from markdown files using remark.js.

https://www.npmjs.com/package/remarkableslides

A CLI tool that automates the process of building and serving remark.js slide presentations from markdown files.

Features:

  • Build markdown files into a HTML document for presentation
  • Create a server that serves the presentations
  • Can watch for changes in markdown and rebuild only what is needed
  • Markdown linting
  • Spell-checking

How to run

Run the following and it will look recursively for .md files starting from the directory you are in.

$ npx remarkableslides

Or install it globally:

$ npm install -g remarkableslides

Now you can run it like this:

$ remarkableslides

Flags

All flags are optional. The default behavior is that it compiles markdown files into presentations. Markdown linting and spell checks are disabled by default. The server that runs the presentations are also disabled by default.

Modes

FlagsDescription
--check-modeDefault: False. Skips presentation creation. Ideal for spell checking or linting only.
--listen-modeDefault: True. Enables file monitoring without starting a server. Automatically deactivated with --check-mode.
--live-modeDefault: True. Enables server deployment for presentations. Automatically deactivated with --check-mode.

Server options

FlagDescription
--live-port=<port_number>Specify the desired port for the server.

Output Options

FlagDescription
--output-md`Output to a single md file titled 'presentation.md'.
--convert-to-pdfOutput a pdf (will not have any formatting).

Use ... to exclude the enclosed content from the markdown output. This content, however, will still be visible in the presentation.

Use ... to exclude the enclosed content from the presentation.

Other Options

FlagDescription
--lintLints the markdown files.
--spell-checkEnables spell checking on the markdown files. Only supports English.
--add-table-of-contentsA table of contents will be inserted as the first slide.
--correct-markdown-list-numberingMakes sure that numbers are in chronological order. Also works for nested lists.

Additional Info

If a CSS file titled presentation.css is present in the directory, it will be automatically included in the presentation.

Server

By default, a server starts on port 1234 and serves all created presentation files.

Endpoint names are derived from markdown file names. For directories containing multiple markdown files, endpoint names are combinations of those file names. If uniqueness is not achieved, folder names are incorporated into the endpoint name to ensure it is unique.

To get an overview of endpints just visit localhost:1234/.

Use the --live-port flag to specify a different port.

Try it out: Create your first slide presentation

  1. Create an md file of any name and add the following content to it:
# Slide Title

Some text.

* Both bullet points
* And numbered lists 
 1. Are
 2. Supported

---

# Slide 2 Title

`---` is used to denote the next slide. 

<div style="color: cyan; font-size: 20px; text-shadow: 2px 2px 4px #aaa;">
  You can also embed HTML into your markdown
</div>

---

# Image slide

<img src="./remarkableslides_logo" alt="Remarkable Slides Logo"/>

<!-- The above will also work in markdown on Github -->
---

# Pros and cons lists

* (+) Pro 1
* (+) Pro 2
* (-) Con 1
* (-) Con 2
* (!) Note!

<!-- The above will still render in markdown but in the HTML presentation 
'* (+/-/!)' becomes a bulleted list with the sign in paranthesis as the bullet point.
Basically the above will render as:

<ul style="list-style-type: '+ '"><li>Pro 1</li><li>Pro 2</li></ul>
<ul style="list-style-type: '- '"><li>Con 1</li><li>Con 2</li></ul>
<ul style="list-style-type: '! '"><li>Note!</li></ul>
 -->
  1. Now run the remarkableslides command in the directory and notice how it creates presentation.html.

  2. Try to run the server (it will watch for changes, rebuild and reload the page automatically):

$ remarkableslides

And checkout localhost:1234. That's all!

CSS styles for the presentation

Create a CSS file titled presentation.css in the same place as your markdown file(s) to include a custom style, otherwise it will get a default template.

I have added some styles that make sense for me. You can always modify them directly in the presentation.html file.

Design choices

All prsentations are named presentation.html. This helps when wanting to add them to a .gitignore.

When serving a presentation the folder and its subfolders are served as static content. That allows images to be served with the presentation.

If there are multiple markdown files in a directory, they will read them by alphabetic order and assembled into a single presentation.

Ignored folders: node_modules.

Ignored files: README.md.

Issues

Feel free to create an issue.

0.0.72

10 days ago

0.0.71

13 days ago

0.0.68

1 month ago

0.0.69

1 month ago

0.0.70

1 month ago

0.0.62

1 month ago

0.0.63

1 month ago

0.0.64

1 month ago

0.0.65

1 month ago

0.0.66

1 month ago

0.0.67

1 month ago

0.0.60

1 month ago

0.0.61

1 month ago

0.0.59

1 month ago

0.0.57

1 month ago

0.0.58

1 month ago

0.0.51

2 months ago

0.0.52

2 months ago

0.0.53

2 months ago

0.0.54

2 months ago

0.0.55

2 months ago

0.0.56

2 months ago

0.0.5

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago