I'm using Strapi as a headless CMS for my website. It's working great, but I'm wondering what the pattern is for rendering the MD as HTML on my website.
Right now I make a call to an endpoint and it returns all of the metadata I need as well as the raw MD. I then use showdown to convert the MD to HTML to be rendered on my website.
Is this the normal pattern? It seems kind of annoying that every time a user goes to the site they have to translate the MD into HTML since the MD doesn't change that often. It might as well just send the HTML? But I've also never come across and endpoint that just sends raw HTML--seems like a security issue too.
My site is very small and performance is not a concern, but I'm curious how most websites accomplish this.
Aucun commentaire:
Enregistrer un commentaire