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

Style Markdown Content #4

Closed
GavMason opened this issue Aug 14, 2022 · 0 comments
Closed

Style Markdown Content #4

GavMason opened this issue Aug 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@GavMason
Copy link
Contributor

GavMason commented Aug 14, 2022

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.

@GavMason GavMason added the bug Something isn't working label Aug 14, 2022
@GavMason GavMason mentioned this issue Aug 15, 2022
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant