Replies: 1 comment
-
Hi Stuart, Mayes, that could definitely work. I've been meaning to try that kind of trick - essentially using GitHub as a writable database that gets updated by a serverless function. I have a library that can help with this: https://github.com/simonw/github-contents I think there are actually two steps to this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Simon,
I liked your article a lot - https://simonwillison.net/2021/Jul/28/baked-data/
it took a couple of looks to get a better idea of what you have done.
Am I right in thinking that you could potentially use serverless functions to read this file and append data to this file in memory
https://github.com/simonw/datasette.io/blob/main/news.yaml
and then continue through using serverless functions to push and commit the in memory (updated/appended) yaml file to the github site which in turn would trigger the rebuild process which would as part of the process would include updating the database with the content from the yaml file?
If yes, that sounds like an interesting pattern to turn a static site into something that is slightly more dynamic / quasi-dynamic.
Thanks,
Stuart
Beta Was this translation helpful? Give feedback.
All reactions