Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create an assets schema (assets.json) with queries and resolvers for assets as data #571

Open
1 of 5 tasks
thescientist13 opened this issue Apr 24, 2021 · 0 comments
Open
1 of 5 tasks
Labels
CLI Content as Data documentation Greenwood specific docs feature New feature or request
Milestone

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Add support for automatically creating an "assets" graph of everything in the assets/ directory, which could really be useful and helpful for things like photo galleries.

Details

Currently as the assets/ folder is automatically known and copied by Greenwood on every build, it might be nice to expose any files as data, just like we do for content. As documented in #570 , this might help ease the burdened, at least at the workspace level, of plugins needing to have to bring too much to the table.

In other words, by using conventions in an assets/ directory, e.g.

src/
   assets/
     gallery1/
       photo1.png
       photo2.png
     gallery2/
       photo1.png
       photo2.png
       photo3.png

You could create whole photo galleries or other multi-media pages and content and access it all with GraphQL. Or using REST, as we would probably also want to generate an assets.json in the CLI, just like we do for the graph.

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) documentation Greenwood specific docs CLI Content as Data labels Apr 24, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone Apr 24, 2021
@thescientist13 thescientist13 added feature New feature or request and removed enhancement Improve something existing (e.g. no docs, new APIs, etc) labels Feb 9, 2022
@thescientist13 thescientist13 removed this from the 1.0 milestone Mar 15, 2022
@thescientist13 thescientist13 added this to the 1.0 milestone Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Content as Data documentation Greenwood specific docs feature New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant