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

@jobber/docz-tools

v2.0.25

Published

--- name: Docz Tools menu: Packages route: /packages/docz-tools ---

Downloads

8,114

Readme


name: Docz Tools menu: Packages route: /packages/docz-tools

Jobber Docz Tools

Jobber Docz Tools contains the theme and components to create Jobber flavored documentation. Documentation is powered by Docz and uses Theme UI for styling.

Usage

Install the package using npm.

npm install --save @jobber/docz-tools

Next, add the theme to a gatsby-config.js file at the root of your project.

// gatsby-config.js
module.exports = {
  plugins: [
    "@jobber/docz-tools",
    {
      resolve: "gatsby-plugin-compile-es6-packages",
      options: {
        modules: ["@jobber/docz-tools"],
      },
    },
  ],
};

Config

Jobber flavored documentation is powered by Docz. However it also adds a few custom config options added to your doczrc.js to allow minor customizations to the theme.

Logo

The Logo can be added by adding a relative path to the logo image that you would like to use.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    logo: `/relative/path/to/logo/file.svg`
  }
}

Sidebar Width

The sidebar width can be adjusted.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    sideBarWidth: 275
  }
}

Sidebar Offset

The sidebar offset can be adjusted if you have a wrapping component at the top, such as a primary navigation bar. By default, it is 0 and represents pixels / px.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    sidebarOffset: 100
  }
}

Container Width

The container width can be adjusted. This will adjust the width that the content of the documention is displayed at.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    containerWidth: 768
  }
}

Hide / Show Actions

The actions in the top right can be hidden if required by adjusting hasActions to false. By default it is true.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    hasActions: false
  }
}

Hide / Show Logo

The logo within the sidebar can be hidden if required by adjusting hasLogo to false. By default it is true.

// doczrc.js
export default {
  ...,
  themeConfig: {
    ...,
    hasLogo: false
  }
}

Frontmatter

The @jobber/docz-tools allows for some custom front matter to be added to your mdx files.

showDirectoryLink

Adding showDirectoryLink will add a new link to the directory where the mdx file is located on Github.

showDirectoryLink must be set to a boolen of true.

---
name: Component Name
showDirectoryLink: true
---

Prioritizing items in the navigation

@jobber/docz-tools allows you to prioritize items within the sidebar navigation by adding a (0x) prefix to the name or menu item in the frontmatter.

In the following example, we will prioritize the Switch item over the Button item in the menu.

## <!-- Button.mdx -->

name: Button menu: Components/Actions

---

## <!-- Switch.mdx -->

name: (01) Switch menu: Components/Actions

---

The same can be done for menus. In the example below, we are prioritizing the Layout menu before the Actions menu.

## <!-- Button.mdx -->

name: Button menu: Components/Actions

---

## <!-- Banner.mdx -->

name: Banner menu: Components/(01) Layout

---