npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kobi-kadosh/remarker

v1.8.2

Published

Remark cli

Downloads

6

Readme

remarker v1.8.1

CircleCI codecov

Remark cli

remark is a simple, in-browser, markdown-driven slideshow tool. remarker is a command line tool for building a remark-based slideshow page very easily.

Usage

Install via npm:

$ npm install --save remarker

Write your slide in markdown:

# My Slide

---

# My Slide 2

???

Presenter notes here

---

save the above as slides.md

Invoke remarker command.

$ ./node_modules/.bin/remarker

Or if you have npx command, then hit:

$ npx remarker

This starts a local server at port 6275 (this is configurable) and you can see your slides at http://localhost:6275/.

See remark's slide and documentation for more details about its syntax, features etc.

Build slides

You can build your slides as static page as remarker build command.

$ ./node_modules/.bin/remarker build

This builds your slides as html page under build/ directory. The output directory is configurable. See the below for details.

Installing globally

You can instead install it globally, in one of these two ways:

sudo npm i -g remarker    # from the npm repository
sudo npm i -g .           # if there's a clone in the current directory

After that, you should be able to invoke it this way from any directory in your system:

remarker [build]

Configuration

You can configure remarker with configuration file called remarker.yml:

Default settings are as follows:

port: 6275
dest: build
source: slides.md
title: ''
assets: ['assets']
css: ''
cssFiles: []
script: ''
scriptFiles: []
remarkConfig: {}
remarkPath: moduleDir + '/vendor/remark.js'
livereload: true
livereloadPort: 35729

Basic options

  • port is the port number of remarker server. Default is 6275.
  • dest is the destination of remarker build command. Default is build
  • source is the source markdown filename. Default is slides.md.
  • title is the page title of the slides. Default is an empty string.
  • css is css text you want to add to slides' html page.
  • cssFiles is the list of additional stylesheet files (URL or the file path relative to your current working director) you want to add to slides' html page. If you provide file paths, these files are copied/served statically. Default is an empty array.

Advanced options

  • assets is the list of assets directory. These directories are copied/served statically.
  • scriptFiles is the list of additional JavaScript files (URL or the file path relative to your current working director) appended after the remark.js. If you provide file paths, these files are copied/served statically. Default is an empty array.
  • script is additional JavaScript code appended after the remark.js and scriptFiles. Default is an empty string.
  • remarkConfig is the config object which is passed to remark.create(options). Default is an empty object.
  • remarkPath is the path to remark.js. This replaces the original remark.js with specified one.
  • livereload is the flag to toggle livereloading feature. Default is true.
  • livereloadPort is the port number for livereloading websocket connection. Default is 35729.

CLI Usage

Usage:
  remarker [options] serve      Serves all the assets at localhost
  remarker [options] build      Builds all the assets to the dest

Options:
  -h, --help                    Shows the help message and exits
  -v, --version                 Shows the version number and exits
  -s, --source <path>           Specifies the slide's markdown file.
                                This overrides 'source' property of the config file.

Examples

Motivation of remarker

remark is a great presentation tool and you can write your slide's contents in markdown. The problem is when you simply use ramark, you need to maintain the html, css and scripts as well as markdown. If you care the details of design and style of the slides, that's fine. However if you don't care the design of the slides that much and want to focus only on the contents, then the settings of css, html, scripts seem quite messy. remarker solves this problem. remarker separates the contents (= markdown) from the settings (css, html, scripts). So you can only focus on and keep maintaining the contents of the slides and let remarker do the rest of the work. This is easier than using remark directly.

How-tos

How to use images in slides

Put the images under ./assets directory and they are automatically served/copied and you can reference it like <img src="assets/my-diagram.png" width="600" /> in your slides.

The directory name of assets can be configured in remarker.yml. See the configuration section for details.

History

  • 2018-06-10 v1.8.1 Fixed help and version options.
  • 2018-06-10 v1.8.0 Added livereloading feature.
  • 2018-01-29 v1.7.0 Enabled file asset (#8).
  • 2018-01-13 v1.6.1 Fixed -s option.
  • 2018-01-12 v1.6.0 Added --source cli option.
  • 2017-08-05 v1.3.0 Added remarkConfig prop.

License

MIT

Star History

Stargazers over time