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

sho

v1.0.3

Published

A tiny commonmark to HTML slideshow generator

Downloads

3

Readme

Sho

A command-line tool for creating simple, self-contained HTML slideshows from Markdown documents. Use horizontal rules to separate slides:

# Title Page Header
## A subheader

---

### Slide 1 Header
Bacon ipsum dolor amet [frankfurter brisket](www.example.com).
* jowl ham hock hamburger
* kielbasa shank short ribs

Short loin `spare ribs` pork doner venison.

sho slides example 1

Features

  • Comes pre-styled so you can concentrate on content
  • CommonMark support with sensible defaults
  • Code highlighting with highlight.js
  • Arrow-key navigation
  • Slide progress bar
  • Can watch your source file for continuous editing
  • Generated HTML has no external dependencies
  • Text scales down for low resolution projectors and screens
  • Supports background images and colours
  • Included CSS for left/right floating images

Getting Started

Requires Node.js to install and run:

$ npm install -g sho

# generates slides.html if slides.md is present
$ sho
# generates presentation.html
$ sho presentation.md
# or specify both paths
$ sho input.md output.html
# you can also watch files
$ sho presentation.md --watch

Just open the HTML file in your favourite browser and you're ready to go!

Helpers

CommonMark allows the inclusion of HTML tags in your markdown. Sho's stylesheet includes some special classes and IDs for customizing your slides:

sho slides example 1

Backgrounds

To include a background image in all slides, add an img tag with id="background" anywhere in your Markdown document. The src should be relative to the destination HTML file:

<img id="background" src="images/background.jpg"/>

# Title Page
etc...

To include a background image in one slide, add an img tag with class="background" inside the slide you want affected. This background will override an all-pages background.

---

<img class="background" src="images/slide5-bg.jpg"/>
### Slide 5
etc...

---

For a solid colour background, a styled span with class="background" or id="background" will behave the same way:

<span id="background" style="background: #380b35"/>
# All slides are purple by default

---

<span class="background" style="background: green"/>
### Slide 1
This slide is green.

Formatting

To center-align text, wrap it in a class="center" div. Don't forget to pad inner Markdown with blank lines:

<div class="center">

by [@Author](www.author.example.io)

</div>

You can left/right float images by adding the corresponding class to an img tag:

<img src="images/example.jpg" class="right"/>

A tag can be styled inline-block with the inline class:

<h4 class="inline">Example:</h4> `code fragment`

API

This module can programmatically transform Markdown files. Install the module non-globally:

npm install sho

Then require and call Sho:

var sho = require("sho");
sho("~/docs/input.md", "~/docs/output.html");

Alternatives

Sho is pretty minimal and might not fit your needs. It is inspired by Cleaver and reveal.js.

Contributing

  1. Fork this repo
  2. Clone your fork
  3. Install dependencies with npm install
  4. Hack away!
  5. Use npm link to test your edited Sho on the command-line
  6. Commit and push changes to your fork
  7. Create a pull request describing the change

License: MIT