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

static-course-builder

v1.0.3

Published

a static course creator from markdown or JSON file..

Downloads

2

Readme

What is this?

A static web site creator, for quickly pulling together step-by-step guides that use YouTube videos for each lesson.

Example site

Give it a simple markdown file and it creates a site with a contents page and pages for each lesson, with next and previous links. You can edit the HTML pages to create a cusotm layout for your course.

Local install.

Create a new course

mkdir testcourse
cd testcourse
mkdir assets
npm init
npm install static-course-builder --save

Add local build script to your package.json file:

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "build"
  },

Add course markdown file

Create a file called course.md and add lessons in the following format:

# How to draw a dog :Cats and Dogs;
https://www.youtube.com/watch?v=bVBW7kQShCg
Description of lesson, just text, one or two lines.

# How to draw a cat  
https://www.youtube.com/watch?v=f29MLfkbLoQ
Description of lesson, just text, one or two lines.

# How to draw a dog :Cars and Planes;
https://www.youtube.com/watch?v=wFcK-NlUQIg
Description of lesson, just text, one or two lines.

# How to draw a dog  
https://www.youtube.com/watch?v=GAvG5naR_AE
Description of lesson, just text, one or two lines.

Add your site template files

Add your template pages

  • contentspage.html - will be used to create index.html starting page
  • lessonpage.html - will be used to create each lesson page
  • contentsinpage.html - used to create navigation inside each lesson page

contentspage.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your course title here</title>
    
</head>

<body>
    <h1>Your course title here</h1>
     
        {{#each []}}
        <h2>{{@key}}</h2>
        <div class="panel">
            <ul>
            {{#each this}}
            <li><a href="{{ this.id }}.html">{{ this.title }}</a></li> 
            {{/each}}
            </ul>
        </div>
        {{/each}}

</body>
</html>

lessonpage.html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{title}}</title>
 
</head>
<body>
 <a href="index.html">Back to contents</a>

 <hr>

 {{title}} 
             
        {{#if youtube}}
        <div class='embed-container'><iframe src='https://www.youtube.com/embed/{{youtube}}?autoplay=1' frameborder='0'
                allowfullscreen></iframe></div>
        {{else}}
        <div class='embed-container holdingvideo'>
            <h2>Sorry :( <br>No video available yet</h2>
        </div>
        {{/if}}
 
        <hr>
        <p> {{{description}}}</p>

        <hr>
                <a href="{{{prev_nav title}}}">&lt; &lt; Previous</a> | 
                <a href="{{{next_nav title}}}">Next &gt;&gt;</a>
           
        <div id="thekey" data-thekey="{{thekey}}"></div>
</body>
</html>
 

contentsinpage.html

<!-- Include this -->

Once you've created your markdown file, and the three template html pages..

build the course

npm run build

This will generate yor site to a folder named output

Anything in your assets folder, will also be copied to the output folder (save your images, css, javascript files etc in the assets folder..)

├── output
│   ├── index.html
│   ├── 1.html
│   ├── 2.html
│   ├── 3.html
│   └── 4.html
│   └── /assets
├── package.json
├── course.md
├── contentspage.html
├── contentsinpage.html
└── lessonpage.html

Launch output/index.html in the browser to the view the site.