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

fantik

v0.0.1

Published

Build presentations from Markdown

Downloads

3

Readme

Fantik Build Status Node.js 8+

Create Presentation Slides From Markdown

Fantik is a simple wrapper that allows you to create presentation slides from Markdown.

Plugins support (only reveal.js for now).

Configurable.

Subsection slides support.

Enable --watch feature, edit your slides in your favorite IDE and let Fantik rebuild HTML slides upon saving.

Installation

There are 2 ways how Fantik can be installed: Binary Executable and NPM. The installation via NPM is rather optional way since it is not so convenient as Binary Executable which is preferrable way.

Binary Executable

Go to release page and download binary executable for your platform. This option allows you to run fantik with all default configuration files are included to the binary and without Node.js installed on your system.

If you don't want to specify path before binary name when executing fantik, then put binary to any path from ${PATH} (e.g. /usr/local/bin)

NPM

npm install fantik
# or globally
npm install -g fantik

Usage

$ ./fantik --help
Usage: fantik [options] [command]

Build presentations from Markdown

Options:
  -V, --version            output the version number
  -h, --help               output usage information

Commands:
  build [options] <input>  builds html presentation from markdown
  list                     list available plugins

$ ./fantik build --help
Usage: fantik build [options] <input>

builds html presentation from markdown

Options:
  --plugin <plugin>  which plugin to use (default: "reveal.js")
  --config <config>  custom configuration (yaml) to use
  --out <output>     output path (default: input name as inputname.html)
  --watch            keep watching for presentation and build output as soon as presentation is changed (default: false)
  -h, --help         output usage information

Configuration

It is possible to override/change default configuration by specifying custom yaml file with --config option for build subcommand.

Custom Configuration

Available options:

  • markers.slidegroup - define slide group marker (default: >>>slidegroup)
  • markers.slide - define slide marker (default: >>>slide)
  • stylesAppend - list of styles to be appended to selected plugin
  • scriptsAppend - list of JS scripts to be appended to selected plugin
  • stylesOverride - list of styles to override the selected plugin
  • scriptsOverride - list of JS scripts to override the selected plugin

NOTE: if both ...Append and ...Override options are specified, then ...Append option takes place.

Custom Configuration Example
stylesAppend:
  - '<link href="https://host/custom.css" rel="stylesheet">'
  - |
    <style>
      section, .reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
        font-family: 'Oswald', sans-serif !important;
      }
    </style>

scriptsAppend:
  - '<script src="https://host/custom.js"></script>'
  - |
    <script>
      const msg = 'Hello';
      console.log(msg);
    </script>

markers:
  slidegroup: '***slidegroup'
  slide: '***slide'

Example

# Creating slides
$ cat <<EOF | tee slides.tmd

>>>slide

# Presentation Name

>>>slide

# Agenda

>>>slidegroup
>>>slide

### Slide 1

>>>slide

### Slide 2

$ ./fantik build slides.tmd

# Open slides.html in your favorite browser

Building Binaries

You can build binary for Linux/Windows and use Fantik without Node.js installed.

# building binaries
npm install                 # install dependencies
npm run build-binaries
ls -lh bin/                 # list built binaries

Motivation

Got tired of making presentation lectures in plain HTML (despite using reveal.js and its markdown support) copying layout structure over and over again. Hopefully it helps making presentation faster, lighter and transferring styling from lecture to lecture easier.

TODO

  1. Other presentation engines support (like impress.js, eagle.js)
  2. PDF export
  3. Markdown to HTML (for frameworks that don't support Markdown)
  4. Additional arguments support for slidegroup and slide classes (to be able to style per slidegroup/slide)
  5. Autodetection of the latest Reveal.js version
  6. Offline slides (downloads slides framework locally and links it)
  7. Use more efficient watch alternative

License

MIT