0.3.17 • Published 1 month ago

@dvcorg/gatsby-theme-iterative v0.3.17

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

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.

0.3.17-beta.0

1 month ago

0.3.16-beta.0

1 month ago

0.3.17

1 month ago

0.3.16

3 months ago

0.3.15

4 months ago

0.3.14

4 months ago

0.3.13

5 months ago

0.3.12

5 months ago

0.3.9

10 months ago

0.3.11

5 months ago

0.3.10

5 months ago

0.3.6

11 months ago

0.3.5

12 months ago

0.3.8

11 months ago

0.3.7

11 months ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.9-beta.1

1 year ago

0.2.9-beta.0

1 year ago

0.2.7

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.1.15

2 years ago

0.1.20

2 years ago

0.1.21

1 year ago

0.1.22

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.16

2 years ago

0.2.6

1 year ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.8

2 years ago

0.1.9

2 years ago

0.1.5-beta.2

2 years ago

0.1.5-beta.1

2 years ago

0.1.5-beta.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.7

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.3

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago