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

How hot-reload for MD files is implemented in Contentlayer #502

Closed
1 task done
Tracked by #500
olayway opened this issue May 10, 2023 · 3 comments
Closed
1 task done
Tracked by #500

How hot-reload for MD files is implemented in Contentlayer #502

olayway opened this issue May 10, 2023 · 3 comments
Assignees
Labels
research Research on this topic is needed

Comments

@olayway
Copy link
Member

olayway commented May 10, 2023

Acceptance

  • find out how hot-reload for MD files is implemented in contentlayer

Notes

Summary

  • when contentlayer is run in development mode:
    • contentlayer config file is read and esbuild watch mode is used to watch for any changes to it
    • then, config values read from the file are used to generate the output .contentlayer/generated folder, but also, along the way, the content folder starts being watched for any changes using Chokidar

More info here:
https://github.com/datopian/flowershow/blob/main/site/content/notes/markdown-hot-reload.md

@olayway olayway changed the title find out how it was implemented in next-contentlayer How hot-reload for MD files is implemented in next-contentlayer May 10, 2023
@olayway olayway added the research Research on this topic is needed label May 10, 2023
@olayway olayway self-assigned this May 10, 2023
@olayway
Copy link
Member Author

olayway commented May 12, 2023

@rufuspollock I've added some notes here https://raw.githubusercontent.com/datopian/flowershow/main/site/content/notes/markdown-hot-reload.md
The summary is also in the issue description.

@olayway olayway changed the title How hot-reload for MD files is implemented in next-contentlayer How hot-reload for MD files is implemented in Contentlayer May 12, 2023
@rufuspollock
Copy link
Member

@olayway any recommendation on whether we could reuse this in flowershow - note here i think this would be less a "built-in" and more a "howto" to start with.

@mohamedsalem401
Copy link
Contributor

FIXED. #620

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Flowershow Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
research Research on this topic is needed
Projects
Status: ✅ Done
Development

No branches or pull requests

3 participants