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

dynamic pages? #373

Closed
lifeiscontent opened this issue Aug 2, 2016 · 8 comments
Closed

dynamic pages? #373

lifeiscontent opened this issue Aug 2, 2016 · 8 comments

Comments

@lifeiscontent
Copy link

Hi, I was wondering if Gatsby has support for something like this?

https://middlemanapp.com/advanced/dynamic_pages/

I'd like to pass some data to a template and have Gatsby generate the pages

@KyleAMathews
Copy link
Contributor

Yes-ish.

You can't yet dynamically create pages but if you add a react component file (e.g. cool-dynamic-page.js) it'll get created at /cool-dynamic-page/. Each page component gets passed all site data at this.props.route.pages. A good example of this is the index page for the blog starter https://github.com/gatsbyjs/gatsby-starter-blog/blob/master/pages/index.js

@KyleAMathews
Copy link
Contributor

I'm working towards making this paradigm much more powerful.

@renatorib
Copy link

I need something like this too =\

@MoOx
Copy link

MoOx commented Aug 26, 2016

FYI, we implemented this in Phenomic by reading user react-router routes and generate all possible pages according to front-matter metadata https://phenomic.io/docs/usage/routing/

@dmitrig01
Copy link

Would love to see what's possible here! :-)

@KyleAMathews
Copy link
Contributor

@dmitrig01 this is all working in v1! Checkout this issue from last fall #421 and the gatsbygram case study https://www.gatsbyjs.org/blog/gatsbygram-case-study/#app-structure

@dmitrig01
Copy link

dmitrig01 commented Apr 3, 2017

Awesome!! Somehow google decided that this issue was the most relevant thing, but seems that is not the case :-) thanks!

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Apr 3, 2017 via email

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

5 participants