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

@dvcorg/gatsby-theme-iterative

v0.3.23

Published

This Gatsby theme is what [Iterative, inc.](https://iterative.ai) uses to power all of our Gatsby websites! It contains all of our shared utility code, as well as our full docs engine. This project is still evolving, and while it's currently very specific

Downloads

467

Readme

Gatsby Theme: Iterative

This Gatsby theme is what Iterative, inc. uses to power all of our Gatsby websites! It contains all of our shared utility code, as well as our full docs engine. This project is still evolving, and while it's currently very specific to iterative.ai websites we hope to make it usable for others in the future.

Usage

Options

  • disable: boolean

    Default: Boolean(process.env.SKIP_DOCS)

    Stops this theme from making pages. Could be used as a conditional for test and development purposes.

  • defaultTemplate: string

    Default: require.resolve('./src/templates/doc.tsx')

    Will be passed to the getTemplate function to use as a default template, the default function simply returns this if template isn't specified.

  • getTemplate: function

    Default:

    const defaultGetTemplate = (template, defaultTemplate) =>
      template
        ? require.resolve(path.resolve('src', 'templates', template + '.tsx'))
        : defaultTemplate

    This function will be given the template field specified in the page's frontmatter, as well as the defaultTemplate specified by the option above. It is expected to return the absolute path to a React component to be given to Gatsby's createPage action.

  • remark: boolean

    Default: true

    if true, this theme will add its own instance of gatsby-transformer-remark.

  • filesystem: boolean

    Default: true

    if true, this theme will add its own instance of gatsby-source-filesystem.

  • glossaryPath: string

    Default: path.resolve('content', 'docs', 'user-guide', 'basic-concepts')

  • simpleLinkerTerms: { matches: string, url: string }[]

    Default: undefined

    These terms will be passed to plugins/gatsby-remark-dvc-linker, which will scan code blocks for ones with content matching matches, and then link it to that entry's url.

  • postCssPlugins: Plugin[]

    Default:

    const postCssPlugins = [
      require('tailwindcss/nesting')(require('postcss-nested')),
      autoprefixer,
      require('tailwindcss')
    ]

    If specified, this array will completely replace plugins this theme passes to PostCSS. This is mostly an escape hatch for if styles are broken with the default plugins. Check out the theme's gatsby-config to see the default plugins, as not having them in this option will very likely break core functionality.

  • docsInstanceName: string

    Default: 'iterative-docs'

    The name that will be passed to the gatsby-source-filesystem instance for docs pages. The resulting sourceInstanceName will be used to identify files that will be processed as docs pages.

  • docsPath: string

    Default: path.resolve('content', 'docs')

  • glossaryInstanceName: string

    Default: 'iterative-glossary'

    The name that will be passed to the gatsby-source-filesystem instance for glossary entries. The resulting sourceInstanceName will be used to identify files that will be processed as glossary pages.

  • argsLinkerPath: string

    Default: ['command-reference', ref, 'cli-reference']

    The path that plugins/gatsby-remark-args-linker will operate on, connecting arguments listed in the summary with their summaries deeper in the page.

  • docsPrefix: string

    Default: 'doc'

    This is the prefix that the docs pages will render to, including the index page at the exact path.

  • sentry: boolean

    Default: true

    If true, this theme will instantiate @sentry/gatsby with a default configuration. This configuration can be imported from sentry-config.js and overridden by creating a Sentry configuration file in your project's root.

Examples

Check out the example project in this project's monorepo, particularly gatsby-config.js.

Linking the local theme

If you want to test the changes to the theme locally without publishing, you can run yarn add @dvcorg/gatsby-theme-iterative@[/path/to/theme] in your project, or simply update the package.json file and change the version to [/path/to/theme], and then run yarn develop as normal. This will use the local version of the theme instead of the published version.

Note: Get the absolute theme path from packages/gatsby-theme-iterative directory. You can use pwd command to get the absolute path.