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

Add a .Markdownify on Page #5976

Closed
bep opened this issue May 19, 2019 · 6 comments
Closed

Add a .Markdownify on Page #5976

bep opened this issue May 19, 2019 · 6 comments

Comments

@bep
Copy link
Member

bep commented May 19, 2019

Find a better name, but this is related to #5975 -- the markdownify has no page context so it just renders the content as "Blackfriday markdown", which is not ... perfect if in a shortcode and the surrounding content is Asciidoc.

@bep bep added this to the v0.56 milestone May 19, 2019
@larzza
Copy link

larzza commented May 19, 2019

To me markdownify is a misleading function name. All other -ify and -ize functions do what the name says but markdownify does the opposite (maybe this matter has been up for discussion before).

@cluck
Copy link

cluck commented May 26, 2019

I always understood it like Markdown is mark-down because it is stripped from the mark-up added in HTML (which stands for Hyperthext-Markup-Language). Given that, the verb to transform Markdown to HTML... shouldn't it be... «markup»?

@bep
Copy link
Member Author

bep commented May 26, 2019

@cluck you are right.

@bep bep modified the milestones: v0.56, v0.57, v0.58 Jul 26, 2019
@bep bep modified the milestones: v0.58, v0.59 Aug 13, 2019
@bep bep modified the milestones: v0.59, v0.60 Sep 6, 2019
@bep bep modified the milestones: v0.60, v0.61 Oct 21, 2019
@bep bep modified the milestones: v0.61, v0.62 Nov 25, 2019
@regisphilibert
Copy link
Member

regisphilibert commented Nov 27, 2019

Continuing from #6545. Ideally we would need to choose which page to use as a Page context on any string rendered with markdownify and when in need for this we could use .Markdowify but, we could also introduce a second optional argument to markdownify for a Page context.

We should test that second argument type before using it as the Page context though because a lot of people are already using Go Pipes:

{{ .Params.body | markdownify }}

Which is fine as long as the function only take one argument, but once it takes two, that .Params.body will be considered the last arg and be used as the Page context and could break a lot of people's code...

@bep bep modified the milestones: v0.62, v0.63, v0.61 Nov 28, 2019
@bep bep modified the milestones: v0.61, v0.62 Dec 11, 2019
@bep
Copy link
Member Author

bep commented Dec 18, 2019

This is fixed in e625088 method is .RenderString.

@bep bep closed this as completed Dec 18, 2019
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants