You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to be able to style our blog post content.
As of now Strapi passes raw markdown through the API in postData.content within the single blog post page (currently [title].vue). This is incompatible as we are using the Tailwind CSS Typography plugin to use the prose feature to style the content.
The problem occurs as this plugin only can style basic HTML. The solution to this is that we can use a markdown renderer to convert the raw markdown to HTML and then the Tailwind Typography plugin should be able to easily style our content.
The way that most made sense to me to achieve this is to use Strapi controllers to render the markdown before it even gets to the frontend. This example was the one that I was looking into using Marked, a tool to render the markdown within a Strapi controller.
The text was updated successfully, but these errors were encountered:
We need to be able to style our blog post content.
As of now Strapi passes raw markdown through the API in
postData.content
within the single blog post page (currently [title].vue). This is incompatible as we are using the Tailwind CSS Typography plugin to use the prose feature to style the content.Here is a good example of how this works from the Tailwind people themselves (https://www.youtube.com/watch?v=J0Wy359NJPM)
The problem occurs as this plugin only can style basic HTML. The solution to this is that we can use a markdown renderer to convert the raw markdown to HTML and then the Tailwind Typography plugin should be able to easily style our content.
The way that most made sense to me to achieve this is to use Strapi controllers to render the markdown before it even gets to the frontend. This example was the one that I was looking into using Marked, a tool to render the markdown within a Strapi controller.
The text was updated successfully, but these errors were encountered: