Multiple source files

17 November, 2019
Back

This website creates two pages from two folders (microblogs and brain-cache).

Graphql filter for files from the pages using this code:

filter: { fileAbsolutePath: { regex: "/microblogs/" } }

filter: { fileAbsolutePath: { regex: "/brain-cache/" } }

Only markdown files in the /microblogs folder is shown in the microblogs page. The same goes for brain-cache.

But if I have two pages, I need to have two template.js or else both pages will look the same. That configuration happens in the gastby-node.js file.


Back