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

support hot reloading content as data changes during development #1278

Open
thescientist13 opened this issue Sep 5, 2024 · 0 comments
Open
Labels
CLI Content as Data feature New feature or request Plugins Greenwood Plugins
Milestone

Comments

@thescientist13
Copy link
Member

Summary

Currently during development, Greenwood builds the list of all pages (the graph) including reading all frontmatter, and creates a data structure that it holds in memory, as well as outputting a graph.json file that can be read / fetched from userland.

However, this data / file never gets updated again, so if you change the frontmatter of a page, or add a new page, the content as data in your application will never change. Instead, you'll have to stop / start the dev server again to generate new data based on the new content.

Details

So naturally, we'll need to do a couple things to achieve this:

  1. Be able to detect a content change (e.g. markdown / HTML) or at the very least tap into the livereload lifecycle and always generate new content as data
  2. Output a new graph.json
  3. Be able to globally update compilation.graph in-memory data structure
  4. For GraphQL, would we have to hot-reload the entire server, or can we just have those resolvers resolve the content server, instead of graph.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Content as Data feature New feature or request Plugins Greenwood Plugins
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant