Also, look to see if markdown files would need to be refreshed at the same time – for example, an image might be added to match a path in an existing document, and that document would need its relative/* links updated to /public/*.
Optimisations
Content currently uses an index file: .nuxt/content-cache/index.json to keep track of all documents.
Should there be something similar for all absolute image paths, and which documents reference them?
Can we even rebuild individual markdown files on demand?
Background
Right now, the user has to restart the server when there is any change in assets.
Having the server monitor for asset updates and reload the page would be great.
Proposal
So it looks like this is super-simple using
unstorage
!May even be able to replace the current globbing system and just use unstorage.
Could also potentially move the copy process to the build hook, and align file and github copy operations.
Notes
Prior art
Content does its watching here:
Also, look to see if markdown files would need to be refreshed at the same time – for example, an image might be added to match a path in an existing document, and that document would need its
relative/*
links updated to/public/*
.Optimisations
Content currently uses an index file:
.nuxt/content-cache/index.json
to keep track of all documents.Should there be something similar for all absolute image paths, and which documents reference them?
Can we even rebuild individual markdown files on demand?