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

Make component-page-creator accessible to developers #2918

Closed
nodox opened this issue Nov 15, 2017 · 4 comments · Fixed by #4490 · May be fixed by tejzpr/gatsby#61
Closed

Make component-page-creator accessible to developers #2918

nodox opened this issue Nov 15, 2017 · 4 comments · Fixed by #4490 · May be fixed by tejzpr/gatsby#61

Comments

@nodox
Copy link
Contributor

nodox commented Nov 15, 2017

Here we want to address the problems in #2424, #2839, and #2514.

The internal plugin component-page-creator is responsible for autogenerating pages. A solution would allow the developer to pass a string, representing a path, to the component-page-creator plugin. The plugin would then use that path to autogenerate pages.

@KyleAMathews Where do we begin?

After making a clone and installing lerna, how do I make a change and generate a new project with my local gatsby clone?

@nodox nodox changed the title Make component-page-creator accessible Make component-page-creator accessible to developers Nov 15, 2017
@KyleAMathews
Copy link
Contributor

You can start a new package for this by running in the repo npm run plop.

Then copy the src for component-page-creator to the src directory of the new package.

How about we call the package — gatsby-plugin-component-page-creator? Though that's a bit verbose... have a better idea?

Anyways, the plugin would need to be able to take a path as an option.

To replace the current usage, the gatsby package should depend on this new package as a dependency and auto-add it as one of the plugins pointing still at src/pages.

Testing is a bit tricky. You can use the workflow with gatsby-dev-cli listed at https://www.gatsbyjs.org/docs/how-to-contribute/#contributing. gatsby-dev-cli looks at a site's package.json to decide which packages to sync over. So add the new package you create manually to your test site's package.json and then gatsby-dev-cli will sync it over.

Lemme know if you have more questions!

@rayk
Copy link

rayk commented Jan 17, 2018

@nodox @KyleAMathews

Hi Guys, just wanted know if there was any movement on this? Do you need a hand?

I have a use case where I need to get Gatsby out of the src directory, so happy to help if required.

@KyleAMathews
Copy link
Contributor

@rayk yeah! AFAIK no one is working on this so would love a PR from you!

@nodox
Copy link
Contributor Author

nodox commented Jan 28, 2018

@rayk go for it! I haven't been able to get to this but would love to be of help in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants