Skip to content

[gatsby-starter-portfolio-jodie] How to duplicate Projects section #827

Discussion options

You must be logged in to vote

I'd do it something along those lines:

  1. Create a src/templates/design.tsx
  2. Copy the contents of https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-jodie/src/components/projects.tsx and adjust the imports to be coming from @lekoarts/gatsby-theme-jodie
  3. Set up a new gatsby-source-filesystem pointing to your design files
  4. Run createPages API inside gatsby-node.ts to query allFile and filter for sourceInstanceName on the name that you gave to the gatsby-source-filesystem in step 3. This way you only get the relevant MDX files
  5. In the createPage action you use the template from step 1
  6. Adjust the navbar to include the new page

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by IonizedCaffiene
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants