Skip to content

Add support for file and (sub-)folder data files  #3

Description

@goncalotomas

Currently we only support a global data folder that is read before parsing content files.

Let's assume that a Griffin project has the following simplified structure

.
├── config
│   └── config.exs
├── lib
│   └── layouts
│       └── base.html.eex
├── src
│   ├── blog.json
│   ├── blog.md
│   ├── blog
│   │   ├── 2019-04-06-why-one-monitor-just-isnt-enough.md
│   │   ├── 2020-04-06-two-monitors-is-good-but-three-is-better.md
│   │   └── 2021-04-06-i-broke-my-desk-using-six-monitors-a-short-story.md
│   ├──  index.json
│   └── index.md
├── mix.exs
└── mix.lock

Enabling file specific data would be to read the configuration in index.json and allowing the index.md template to read the configuration. Furthermore, the configuration applies to subfolders as well, meaning that aside from blog.md, all of the 3 blog entry templates would also have access to the configuration listed in blog.json

This is a significant configuration change, so we should do it before we start caring about backwards compatibility.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions