Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can I've collections? #130

Closed
sandrodz opened this issue Feb 20, 2016 · 1 comment
Closed

can I've collections? #130

sandrodz opened this issue Feb 20, 2016 · 1 comment

Comments

@sandrodz
Copy link

My site structure is complicated. I need to have several different collections. Is this possible?

@KyleAMathews
Copy link
Contributor

Every page has access to all other pages. So wherever you want a collection, just add a React.js component there e.g. to create a photo gallery, /photos.js.

In Gatsby 0.8+ page data is at this.props.route.pages. For a photo gallery, you write a filter function which pulls out all the photo pages.

holyjak added a commit to holyjak/gatsby that referenced this issue Sep 24, 2018
Mention that build may fail with

```
error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

   8 | 	else
   9 | 		root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.sort"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
     |  ^
  11 | return


  WebpackError: Invariant Violation: Minified React error gatsbyjs#130; visit https://reactjs.org/docs/error-decoder.html?invari  ant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and addi  tional helpful warnings.
```

when we mix `import` and `require` in the same (page) file in Gatsby 2, which has upgraded to Webpack 4, which is stricter about this.
holyjak added a commit to holyjak/gatsby that referenced this issue Sep 24, 2018
Mention that build may fail with

```
error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

   8 | 	else
   9 | 		root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.sort"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
     |  ^
  11 | return


  WebpackError: Invariant Violation: Minified React error gatsbyjs#130; visit https://reactjs.org/docs/error-decoder.html?invari  ant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and addi  tional helpful warnings.
```

when we mix `import` and `require` in the same (page) file in Gatsby 2, which has upgraded to Webpack 4, which is stricter about this.
holyjak added a commit to holyjak/gatsby that referenced this issue Sep 25, 2018
Mention that build may fail with

```
error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

   8 | 	else
   9 | 		root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.sort"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
     |  ^
  11 | return

  WebpackError: Invariant Violation: Minified React error gatsbyjs#130; visit https://reactjs.org/docs/error-decoder.html?invari  ant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and addi  tional helpful warnings.
```

when we mix `import` and `require` in the same (page) file in Gatsby 2, which has upgraded to Webpack 4, which is stricter about this.
shannonbux pushed a commit that referenced this issue Sep 25, 2018
* debugging build: error due to import/require mix

Mention that build may fail with

```
error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

   8 | 	else
   9 | 		root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.sort"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
     |  ^
  11 | return

  WebpackError: Invariant Violation: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invari  ant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and addi  tional helpful warnings.
```

when we mix `import` and `require` in the same (page) file in Gatsby 2, which has upgraded to Webpack 4, which is stricter about this.

* updated number of reasons to account for any reasons people add in the future :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants