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

markdownify does not replace any shortcodes #3821

Closed
psistorm opened this issue Aug 21, 2017 · 5 comments

Comments

@psistorm
Copy link

commented Aug 21, 2017

Is there a reason that markdownify does not replace shortcodes? I thought this would be rather consistent if any shortcodes that can be used in content files could also be used within text that is "markdownified".

If not I would state such a feature request to allow usage of shortcodes within markdownified texts. I'm trying to do an API documentation with hugo using frontmatter to store possible properties and functions for all methods of a class. And for each method I have possible example text or description that sometimes uses a custom source code shortcode or shortcodes for info/warning boxes.

@bep

This comment has been minimized.

Copy link
Member

commented Aug 21, 2017

Please use https://discourse.gohugo.io/ for questions/troubleshooting. Also see Hugo Documentation.

@bep bep closed this Aug 21, 2017
@bep

This comment has been minimized.

Copy link
Member

commented Aug 21, 2017

If not I would state such a feature request to allow usage of shortcodes within markdownified texts.

I would turn down such a request. Shortcodes is for content files. markdownify is for templates.

@vitpankin

This comment has been minimized.

Copy link

commented Jan 27, 2019

@bep how can I achieve the following then? I have this shortcode to include .md files into other .md files, this is super useful for tabbed content, to have content for each tab into different files:
includeMarkdown.html

{{ $includePath := (print .Page.Dir (.Get 0)) | printf "./content/%s" }}
{{ readFile $includePath | markdownify }}
{{ .Inner }}

also I have number of shortcodes for simplified rendering for blocks like quotes, tips blocks, and etc.

whenever I include files into base .md file - shortcodes does not work, coz markdownify render all shortcodes as plain text without any parsing. What did I do wrong?

@moorereason

This comment has been minimized.

Copy link
Contributor

commented Jan 28, 2019

@vitpankin, please use the forums to discuss what you're wanting to do.

@biodranik

This comment has been minimized.

Copy link
Contributor

commented May 20, 2019

This feature would be really useful, especially if it can be activated by an additional optional parameter to markdownify, or even as a separate function like markdownifyShortcodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.