Markdown files in data for sections and partial populating

Modern websites tend to have pages with sections that act like separate subpages. For example a typical home page could have a slider section, welcome section, about us section etc. Best way in my opinion would be each section to have its separate markdown file but this markdown files should not be in the content folder if there is no need to generate a separate page. Best fitting solution to keep things clean would be to enable markdown contents in the data folder. In addition this proposal could help isolate partials from their data so we could use the same partial in separate pages/places using different data. For example lets say we have a 2 column partial with an image on the left column and a title and text on the right which is a common pattern. In this case we could pass a markdown data (or we could pass more than one markdown data files if needed) to the partial. The markdown file could have title and image front matter and that partial could be used in many other places using different data for it.

We already do that with page bundles. I think that covers all your conditions.

Maybe you can try headless = true in Front matter of the file.

1 Like