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

@readysteady/gatsby-theme-docs

v0.1.2

Published

A GatsbyJS documentation theme.

Downloads

3

Readme

A Gatsby theme for creating a documentation site.

Features

  • Markdown documentation for your site sourced from a documentation folder.
  • Light / Dark mode.
  • PrismJS code highlighting.
  • MermaidJS diagrams.
  • MDX for super extensible documentation.
  • Customization using Theme-UI by shadowing the theme.js file.
  • Configurable navigation menu using simple YAML format.
  • New DocPost node interface that allows other sources for documentation (advanced useage).

Installation

Create a new Gatsby site and add theme to your project

npm install --save @readysteady/gatsby-theme-docs

Usage

Add the theme as a plugin in your gatsby-config.js file.

module.exports = {
    plugins: [`@readysteady/gatsby-theme-docs`],
}

Or to use options...

module.exports = {
    plugins: [
        {
            resolve: `@readysteady/gatsby-theme-docs`,
            options: {
                contentPath: 'docs',
                basePath: '/',
            },
        },
    ],
}

Theme options

| Key | Default value | Description| | ---------------- | ------------- | ------------ | | basePath | / | Root url for all document posts | | contentPath | docs | Location of markdown documents and navigation.yaml| | docsSourceName | docs | Alternate gatsby-source-filesystem source name | | proxyType | MdxDocPost | Alternate GraphQL proxy node type | | mdx | true | Configure gatsby-plugin-mdx (if your website already is using the plugin pass false to turn this off)Note: If you do turn this off you will need to configure your MDX to enable mermaid and prismjs plugins if you wish to use these features. |

Additional configuration

In addition to the theme options, you can configure some options via the siteMetadata object in your site's gatsby-config.js

// gatsby-config.js
module.exports = {
    siteMetadata: {
        // Your documentation site title
        title: `My Documentation Site`,
        // Text in the site footer
        footer: `Copyright(C) 2019 My Company`
    },
}

Documentation Folder

Sample site out of the box

If no documentation folder is found a new folder will be created with some example documentation.

If no navigation.yaml file is found an example one will be created within your documentation folder.

Document Format

Documents are created using markdown and requires some markdown frontmatter. The front matter currently supported are:

| Key | Importance | Description| | --------- | ------------- | ------------ | | title | Required | The title of the document | | slug | Optional | Slug is the path of the document which will be added to the basePath.If no slug is provided it will be derived from the filename.|

Example Document

---
title: "A very important document"
---

Nullam id dolor id nibh ultricies vehicula ut id elit.
Vestibulum id ligula porta felis euismod semper.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum.

Navigation

To configure the navigation menu for your site you will need to crate a navigation.yaml file in the same folder as your markdown documents (default: docs)

The YAML file allows you to define the structure of your navigation.

Example

# Navigation supports up to 4 levels of nesting.
# This file is an example.
# Title will be ignored, but keep it here.
- title: Docs
  # `key` has to be `docSidebar` for navigation to work.
  key: docSidebar
  items:
    # Level 0
    - title: Introduction
      link: /
    # Level 0
    - title: Expandable
      link: /expandable/
      items:
        # Level 1
        - title: Level One
          link: /level-1/
          items:
            # Level 2
            - title: Level Two
              link: /level-2/
            - title: Also Level Two
              link: /also-level-2/
              items:
                # Level 3
                - title: Level Three
                  link: /level-3/
    # Level 0
    - title: The End.
      link: /end/