You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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
Output a new graph.json
Be able to globally update compilation.graph in-memory data structure
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
The text was updated successfully, but these errors were encountered:
thescientist13
changed the title
support hot reloading content as data changes
support hot reloading content as data changes during development
Sep 5, 2024
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:
compilation.graph
in-memory data structureThe text was updated successfully, but these errors were encountered: