My desired content folder structure is as follows:
- content (directory)
-- home.md
-- trip_A (directory)
--- intro.md
--- day_1.md
--- day_2.md
-- trip_B (directory)
--- intro.md
--- day_1.md
I would ideally like to define this as a single "source" for the @gridsome/source-filesystem
plugin so that the addition of future sub-folders are automatically populated in the source.
However, it appears that I may have to manually specify a separate @gridsome/source-filesystem
source for each of the sub-folders? Is this correct, or is there a workaround of sorts?
For example:
- How do I create a generic source for all trip posts (regardless of trip A, B, C or, in future, trip D) that uses a
typeName
(i.e. template page) of typeTrip
but hosts each of these pages at their respective parent directories, e.g./tripA/day_1.html
,/tripB/day_1.html
etc? The config seems to take a singlepathPrefix
unless there is a way to use a dynamic wild card route? - How do I use different types? Here it seems to make sense to create a separate
source-filesystem
entry with a differenttypeName
, unless there is another way to do this?