-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Parsing markdown inside shortcodes #5900
Comments
Please use https://discourse.gohugo.io/ for questions/troubleshooting. Also see Hugo Documentation. |
@bep I'm not sure if this is the same thing, but as of v0.55.3 this behavior has changed for me. That used to render markdown, and now it doesn't. I don't see anything in the documentation that would explain that change. Are you sure this should have been closed? It appears to be a valid bug report. |
@pawelgrzybek I have read that; I apparently don't understand what it means, because I don't even know what the old or new behavior is. That makes it sound like the new behavior should still be rendering markdown, but I'm not getting any markdown rendered anymore. Is that he cause of this problem? If so, why does it just break every single shortcode I have in my theme and sites and should I be reverting to the old behavior or piping I see a bunch of threads on the mailing list, but I can't sign up to participate and they don't seem to have answers either. It seems like I'm not the only one confused by this and who thought it was a bug that everything suddenly broke. |
The solution is mentioned in the docs. This is everything that you have to do. pawelgrzybek/pawelgrzybek.com@6c0e63e Hopefully that helps. |
On Thu, Apr 25, 2019, at 20:33, Pawel Grzybek wrote:
The solution is mentioned in the docs. This is everything that you
have to do.
What does that even mean? What are the side effects? What is the
difference between that and `markdownify`? The docs are incomplete and
it still feels like a bug that everything suddenly broke. I'm worried
about not picking the correct solution because there's no information in
the docs about what any of this does or why it broke.
Maybe all of this is clear if you're familiar with the Hugo internals,
but it's not clear to me or any of the other people who have asked on
the list or filed issues. Please clarify the situation.
—Sam
|
Am I really the only one that thinks that is confusing and doesn't tell me anything? What does it even mean that it is "fully rendered"? I still have no idea if that's an okay solution, or if it's just going to go away in a few months since apparently whatever the old behavior was is deprecated. Also, what is the difference between doing that and piping to markdownify and why would I use one over the other? The changelog just mentions this but doesn't give you any information about what's happening or what the benefits of doing one or the other might be. |
I don't want to do better, it might be fine. I just want it documented what the options are and what the benefits and drawbacks are in such away that's understandable to someone who isn't familiar with Hugo's internals and just uses it to build websites. |
I agree that the documentation is confusing. It clearly states that, even in 0.55, if you want to use markdown in your shortcodes, you have to use the However, that is exactly what is not working. |
Please listen to @fritzmg and all the other people that opened issues for this. We can't update the docs because no one understands what this means, and I'm still lost as to what actually changed or what solution I should use. Stop blaming your users for being confused and write clearer docs. |
I have contributed to this discussion thread here, I think this clears things up a little: https://discourse.gohugo.io/t/misunderstanding-of-shortcode-syntax-in-0-55/18538 |
That all makes a lot more sense than the documentation; thanks for linking the thread. |
Though I discovered that the new approach is not without problems: https://discourse.gohugo.io/t/misunderstanding-of-shortcode-syntax-in-0-55/18538/25 |
For anyone actually looking for a solution... If you are using your shortcode as {{ myclosingsc }}
# heading
{{ myclosingsc /}}
{{ .Inner | markdownify}} this outputs: <h1>heading</h1> |
Got this issue zwbetz-gh/papercss-hugo-theme#8 using #5900 (comment) solution. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi.
I have a shortcode
update
.When I use it with some markdown content (link for example).
It is not getting converted to HTML anymore. I am almost sure it used to work just fine on previous versions of Hugo. Currently it outputs a plain text.
Still ❤️ Hugo and thanks for building amazing software!
The text was updated successfully, but these errors were encountered: