Skip to content

Commit

Permalink
Update README and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
markphilpot committed Nov 16, 2022
1 parent 85f945e commit 47db9e9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions packages/gatsby-source-filesystem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ module.exports = {

## Options

In addition to the name and path parameters you may pass an optional `ignore` array of file globs to ignore.
### name

The name of the fileset when querying file nodes from graphql.

### path

The path to the files (e.g. `${__dirname}/content/blog`)

### ignore

You may pass an optional `ignore` array of file globs to ignore.

They will be added to the following default list:

Expand All @@ -62,7 +72,9 @@ They will be added to the following default list:
../**/dist/**
```

To prevent concurrent requests overload of `processRemoteNode`, you can adjust the `200` default concurrent downloads, with `GATSBY_CONCURRENT_DOWNLOAD` environment variable.
### usePolling

Configure the `usePolling` option of https://github.com/paulmillr/chokidar

## How to query

Expand Down Expand Up @@ -193,6 +205,8 @@ createRemoteFileNode({
})
```

To prevent concurrent requests overload of `processRemoteNode`, you can adjust the `200` default concurrent downloads, with `GATSBY_CONCURRENT_DOWNLOAD` environment variable.

#### Example usage

The following example is pulled from [gatsby-source-wordpress](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-wordpress). Downloaded files are created as `File` nodes and then linked to the WordPress Media node, so it can be queried both as a regular `File` node and from the `localFile` field in the Media node.
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-source-filesystem/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ exports.pluginOptionsSchema = ({ Joi }) =>
usePolling: Joi.boolean()
.default(false)
.description(
`When set to true, use file system polling instead of fsEvents`
`Configure the "usePolling" option of https://github.com/paulmillr/chokidar`
),
})

Expand Down

0 comments on commit 47db9e9

Please sign in to comment.