Skip to content

Commit

Permalink
chore(gatsby-source-wordpress): Correct glob pattern examples (#11804)
Browse files Browse the repository at this point in the history
## Description

Adds a test for a route blog pattern that is working both on custom hosted WordPress API paths and on API paths from sites  that are hosted on wordpress.com.

## Related Issues

This is picking up the discussion on the routes documentation within #10871 and the according pull request #10887.
  • Loading branch information
riddla authored and DSchau committed Feb 19, 2019
1 parent 05ca4bf commit f6a475b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions packages/gatsby-source-wordpress/README.md
Expand Up @@ -119,16 +119,16 @@ module.exports = {
// all routes that begin with `yoast` from fetch.
// Whitelisted routes using glob patterns
includedRoutes: [
"**/*/*/categories",
"**/*/*/posts",
"**/*/*/pages",
"**/*/*/media",
"**/*/*/tags",
"**/*/*/taxonomies",
"**/*/*/users",
"**/categories",
"**/posts",
"**/pages",
"**/media",
"**/tags",
"**/taxonomies",
"**/users",
],
// Blacklisted routes using glob patterns
excludedRoutes: ["**/*/*/posts/1456"],
excludedRoutes: ["**/posts/1456"],
// use a custom normalizer which is applied after the built-in ones.
normalizer: function({ entities }) {
return entities
Expand Down Expand Up @@ -199,13 +199,13 @@ If an endpoint is whitelisted and not blacklisted, it will be fetched. Otherwise

```javascript
includedRoutes: [
"**/*/*/posts",
"**/*/*/pages",
"**/*/*/media",
"**/*/*/categories",
"**/*/*/tags",
"**/*/*/taxonomies",
"**/*/*/users",
"**/posts",
"**/pages",
"**/media",
"**/categories",
"**/tags",
"**/taxonomies",
"**/users",
],
```

Expand Down

0 comments on commit f6a475b

Please sign in to comment.