[gatsby-starter-portfolio-jodie] How to duplicate Projects section #827
-
How would I go about creating a duplicate of the Projects section for a different set of content? (e.g. have one "Projects" set for Photos and one for Design, keeping them as separate sets) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@IonizedCaffiene Have you been able to fix this? I am trying to do a similar thing, and have been able to add to the navigation side panel (simple to do in the gatsby-config.js) but am running into issues with the placement of a .tsx or .js that represents the page and can pull from the components in other sections. |
Beta Was this translation helpful? Give feedback.
-
I'd do it something along those lines:
|
Beta Was this translation helpful? Give feedback.
I'd do it something along those lines:
src/templates/design.tsx
@lekoarts/gatsby-theme-jodie
gatsby-source-filesystem
pointing to yourdesign
filescreatePages
API insidegatsby-node.ts
to queryallFile
and filter forsourceInstanceName
on the name that you gave to thegatsby-source-filesystem
in step 3. This way you only get the relevant MDX filescreatePage
action you use the template from step 1