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

glyder

v2.0.3

Published

Flexible markdown styleguide generator with code previews

Downloads

7

Readme

Glyder

Glyder is a flexible markdown-based style guide generator with support for code previews.

Once installed, the glyder command can be used to transform any directory of Markdown files into a website.

Installation

Glyder can be installed with plain ol' NPM:

npm install -g glyder

If you'd like to install it local to a project, use the --save-dev flag:

npm install --save-dev glyder

Please note that if you install glyder local to a project you will need to use the npx command with the glyder binary. For example:

npx glyder --help

Configuration

Configuration is stored in a glyder.json file stored in the root of your Glyder project.

Here are the options, with default values shown:

{
  "input": "src",                        // Directory where markdown and other source files are stored
  
  "output": "build",                     // Directory where build files are generated (HTML, etc.) 

  "tmp": ".tmp",                         // Directory for temp files generated by glyder command

  "logo": "/glyder-logo.svg",            // Relative URL for the logo of your project

  "edit": null,                          // Edit URL template. Use this format for GitHub:
                                         // "http://github.com/username/repository/edit/master/%filename%"

  "copyright": "© %Y Your Company Here"  // Copyright for your project filtered through strftime

  "sections": [                          // Sections for the navigation 
    { "name": "Guidelines", "key": "guidelines" },
    { "name": "Components", "key": "components" }
  ],

  "packages": [                          // Package sets for code previews
    {
      name: 'oxygen',
      styles: [ 'http://oxygencss.com/styles/site.css' ],
      scripts: [ 'http://oxygencss.com/styles/site.js' ]
    }
  ]
}

Composing articles

Articles are created by putting markdown files in your source directory. By default this is src in the root of your project, but it can be configured in the Glyder configuration file (glyder.json). All markdown files must use the ".md" file extension.

Glyder articles must include front matter. By default the title key is the only required frontmater option:

---
title: My article
---

Markdown contents here

Frontmater options include:

| Key | Description | | :------------ | :---------- | | title | The title of the article. This appears as an H1 at the top of the page. | | section | The section in the side navigation where this article should appear. Sections are reference by key and can be declared in your Glyder config. | | index | Used to order the navigation within a section in the sidebar. Lower values are sorted first. And then by the title of the article. By default articles have a index value of 100. | | noHeading | Do not output the title. Instead rely on the author to include it in the Markdown portion of the article. | | redirectTo | Redirect to a specific URL. Implemented with an HTML meta refresh tag. |

Development server

To bring up a lightweight developement server to preview your project, use the serve command:

glyder serve

This will launch a preview server here:

http://localhost:9000

You must use the glyder command from the root directory of the project.

Building HTML

To generate a site in the build directory (specified in the config), use the build command:

glyder build 

Made with Gulp

Glyder is really a frontend for a bunch of Gulp tasks that combine to make a flexible style guide generator. If you are familiar with Gulp, you should find it fairly easy to contribute.

Acknowledgements

Originally based on code from John Long's styleguide repo with improvements by Michael Lee.