it says that the filter markdownify is necessary when not using {{content}} in a layout. Also in the filter guide:
it says it is used to convert markdown code into html.
But I had some doubts about the effectiveness of this command because I tried to remove it from {{file.content | markdownify }} and it would render it anyways.
Moreover I also wanted to share with you another issue I solved by removing this filter.
I had a layout with some katex formulas rendering scripts. I needed them because inside this layout I would include a .md file with some katex formulas. I would include this file though the Liquid command {{file.content | markdownify}}. The fact is that with markdownify it wouldn’t render the formulas whilst it would do it as soon as I would cancel it.
The primary indication to use the markdownify filter is when processing text that wouldn’t otherwise be parsed as Markdown and then converted into HTML.
For example, say you a source file named about.html instead of about.markdown or about.md. Since the extension is .html, it will not be processed by Kramdown or any other Markdown processor. So if you have any Markdown content in about.html, either directly or via the front matter, it will not be converted to HTML unless you use the markdownify filter.
Another scenario is using Markdown data in HTML layouts. If you have {{ site.description | markdownify }}, then the description key in your config file could point to a Markdown text and it will be rendered as HTML.
I use markdownify a lot in combination with custom front matter variables. Some of my templates have differently designed sections with specific headings and subheadings. I define those in front matter and use markdownify to get things like proper paragraphs, <strong> and <em> in the body text.
Same for me. I have put a markdown snippet in quotes like a markdown image tag, then placed it in html file with markdownify to convert it.
I also have a data file of YAML format which has some md in it which becomes plain text when rendered unless I use markdownify. Similar case to the frontmatter comment
Can you be more specific with what is not working?
If you have a multi line paragraph perhaps you need to replace line breaks with <br> tag
site.description | markdownify | newline_to_br
```
You can also try using two newline filters in a row. Or move markdownify to end.
Docs
https://shopify.dev/docs/themes/liquid/reference/filters/string-filters