0.0.85 • Published 4 months ago

remarkableslides v0.0.85

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

remarkableslides

NPM Version

A CLI tool that makes it feel good to create slides from markdown files.

Make slides from markdown files using remark.js.


Features

  • Build markdown files into HTML documents for presentations
  • Create a server that serves the presentations
  • Watches for changes in the markdown and rebuilds only what is needed
  • Create multiple presentations recursively
  • Combine multiple markdown files in the same folder into a single presentation
  • Markdown linting
  • Spell-checking

How to run

Run the following and it will recursively look 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

Try it in less than 1 minute!

  1. Create an md file with any name and add the following content to it:
<div class="title-card">
    <h1>Try Remarkable Slides now!</h1>
</div>

---

# Slide Title

Some text.

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

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

> This is a quote

**Bold** text and *italic*.

<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="https://raw.githubusercontent.com/anderslatif/remarkableslides/main/assets/remarkableslides_logo.png" 
      alt="Remarkable Slides Logo"
      style="height: 40vh;"/>

<!-- You can point to local files as well -->
<!-- Use img tags to make the images appear on GitHub as well -->

---

# Example of a video slide

## What is DevOps?

[![What is DevOps?](http://img.youtube.com/vi/kBV8gPVZNEE/0.jpg)](https://www.youtube.com/watch?v=kBV8gPVZNEE)

---

# Code slide

There is support for syntax highlighting of multiple languages. 

Just specify the language after the three backticks.

---

# Table slide

| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1    | Row 1    | Row 1    |
| Row 2    | Row 2    | Row 2    |
| Row 3    | Row 3    | Row 3    |

---

# 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.
$ npx remarkableslides
  1. Check out localhost:1234. That's all!

  2. The server will watch for changes. Change something and it will reload the page automatically.

The result should look like this:


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.

You can always run:

$ npx remarkableslides --help

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 <div class='ignore-output-md'>...</div> to exclude the enclosed content from the markdown output. This content, however, will still be visible in the presentation.

Use <div class='ignore-presentation'>...</div> to exclude the enclosed content from the presentation.

CSS Options

FlagDescription
--theme <type>Specify a pre-made theme for the presentation.
--css <path>Specify a CSS file to use for 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.

Presentation modes

Press F for full-screen.

Press C to clone the window.

Press P to see the presenter view. Everything in each slide written after ??? will be considered a presenter note.


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.


CSS Themes

Here are all the different ways to change the CSS theme for the presentation:

1. Modify the Presentation directly

Edit the <style> tag in the presentation.html file.

(Will not work with live reload).

2. Create (a) CSS file(s)

Add CSS files in the same directory as the markdown files.

3. Point to the CSS file

When invoking the command use the --css flag:

$ npx remarkableslides --css ../../link/to/your/css_file.css

4. Use a ready-made theme

You can choose a theme with the --theme flag.

$ npx remarkableslides --theme default

The behavior is that the CSS theme is set to default if no theme is specified. If a CSS file is found then it will be used instead.

It's possible to mix your own CSS file with a theme by adding the --theme flag.

The current support for CSS themes are:

CSS Theme
default

The theme name corresponds to the file names in the ./lib/presentationUtil/css directory without the .css extension.

If you would like to have your reasonable personal theme included in the library then make a PR with the CSS file to that folder.


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, CONTRIBUTING.md, CHANGELOG.md.


Issues

Feel free to create an issue.

0.0.84

4 months ago

0.0.85

4 months ago

0.0.80

7 months ago

0.0.81

7 months ago

0.0.82

7 months ago

0.0.83

6 months ago

0.0.75

8 months ago

0.0.76

7 months ago

0.0.77

7 months ago

0.0.78

7 months ago

0.0.79

7 months ago

0.0.74

10 months ago

0.0.73

11 months ago

0.0.72

1 year ago

0.0.71

1 year ago

0.0.68

1 year ago

0.0.69

1 year ago

0.0.70

1 year ago

0.0.62

1 year ago

0.0.63

1 year ago

0.0.64

1 year ago

0.0.65

1 year ago

0.0.66

1 year ago

0.0.67

1 year ago

0.0.60

1 year ago

0.0.61

1 year ago

0.0.59

1 year ago

0.0.57

1 year ago

0.0.58

1 year ago

0.0.51

1 year ago

0.0.52

1 year ago

0.0.53

1 year ago

0.0.54

1 year ago

0.0.55

1 year ago

0.0.56

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago