datopian / flowershow

💐 Publish your obsidian digital garden or any markdown site easily and elegantly.
https://flowershow.app/
MIT License
822 stars 97 forks source link

Hot-Reloading Feature Implementation #587

Closed mohamedsalem401 closed 8 months ago

mohamedsalem401 commented 11 months ago

Overview

The "flowershow" project currently lacks hot-reloading when editing files in the content directory. This issue is for planning and tracking the implementation of this feature.

Proposed Changes

I am working on implementing hot-reloading in the "markdowndb" library using "chokidar.js." The proposed changes include:

Two approaches for "flowershow" to refresh the page after changing the markdown.db file

There are two potential approaches for refreshing the file content when changes occur. I would need to discuss these approaches and decide upon them.

Here's a demo of the hot-reloading:

https://github.com/datopian/flowershow/assets/67981832/3b663a57-f562-4332-be88-080f34a74002

rufuspollock commented 11 months ago

@mohamedsalem401 this is great - as per thread on discord. You could also paste your video here!

In the first instance i'd implement the automatic rebuild in markdowndb and then evaluate where we are - e.g. it may be that works quite well even without a rebuild on nextjs side.

mohamedsalem401 commented 8 months ago

FIXED. https://github.com/datopian/flowershow/pull/620