Question about storing data for a substack-like clone?
I'm working on a pet project wherein users can write posts with a full markdown editor.
I'm curious if anyone knows how best to store these in the backend? Do you save the content as a
.md
file? or save it as plain text in the DB??
Am I making sense? Basically what's the ideal way to store user-generated markdown content3 Replies
when i did it i stored the raw md text
and then on fetching i used marked to convert it to html and then rendered that html
all the conversion part happens on the server
idk if this is the best way tho
interesting
you coulod store it as html, just make sure you sanitize it before storing it
html text in the db