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

@cookbookdev/docsbot

v4.24.7

Published

## Step 1. Contact us to get an API Key

Downloads

1,863

Readme

How to integrate "Ask Cookbook" into your website

Step 1. Contact us to get an API Key

You likely already have one, but if you don't, please contact us at [email protected]

Step 2. Pick one of the integration methods below

Having troubles or need something custom? Contact us

Integration methods

Basic integration

Suitable for static websites, outlines the general idea of how to integrate the bot into your website. As long as you can directly edit the HTML of your website, you can use this method.

<!-- Somewhere in <head> -->
<script src="https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js" defer></script>

<!-- Somewhere in <body> -->
<div id="__cookbook" data-api-key="HERE_GOES_APIKEY"></div>

React integration

Install the package

yarn add @cookbookdev/docsbot

OR

npm install @cookbookdev/docsbot

OR

pnpm install @cookbookdev/docsbot

Import and add our component to something that wraps the content, for example in Next.js it could be _app.js or layout.js

import AskCookbook from "@cookbookdev/docsbot/react";

export default function App() {
  return (
    <>
      <AskCookbook apiKey="[HERE_GOES_YOUR_API_KEY]" alwaysOpen={false} noFastMode={false} />
      {/* Your content */}
    </>
  );
}

Webflow integration

  1. Go to the Dashboard
  2. Get to the "Site settings" (see picture below)
<script src="https://cdn.jsdelivr.net/npm/@cookbookdev/docsbot/dist/standalone/index.cjs.js" defer></script>
  1. Put the following code into the "Footer code" text area
<div id="__cookbook" data-api-key="[HERE_GOES_YOUR_API_KEY]"></div>
  1. Save both of them

image 7. Publish website

image

Gitbook Integration

The good news is that we know how to integrate the "Ask Cookbook" into Gitbook! The bad news is that we yet to write a guide on it. If you need it, please contact us

API of <div> element

<div
  id="__cookbook"
  data-always-open <!-- Optional. If you want to have modal always open, usually for the showcase purposes -->
  data-no-fast <!-- Optional. Disables fast mode switch, forces dosbot into the detailed mode -->
  data-api-key="API_KEY_GOES_HERE"
/>

API of React component

<AskCookbook
  apiKey="API_KEY_GOES_HERE"
  alwaysOpen={false} // Optional. If you want to have modal always open, usually for the showcase purposes
  noFastMode={false} // Optional. Disables fast mode switch, forces dosbot into the detailed mode
/>