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

Zola Shortcodes don't support markdown #1938

Closed
jbcurtin opened this issue Jul 23, 2022 · 8 comments
Closed

Zola Shortcodes don't support markdown #1938

jbcurtin opened this issue Jul 23, 2022 · 8 comments

Comments

@jbcurtin
Copy link

Bug Report

Environment

Zola version: 0.15.3

Expected Behavior

Unable to put links into a shortcode snippet using markdown link syntax.

Current Behavior

The contents of the shortcode is rendered as is, without any html.

Step to reproduce

  • Create a shortcode with body
  • Add contents, including link to something
  • Render the page using zola

Example

Screen Shot 2022-07-23 at 3 44 27 PM

e page
@Keats
Copy link
Collaborator

Keats commented Jul 23, 2022

It's lacking context but shortcodes as in with .html extension will render HTML. If you want to render Markdown, use .md shortcodes: https://www.getzola.org/documentation/content/shortcodes/

@Keats Keats closed this as completed Jan 12, 2023
@MaxIhlenfeldt
Copy link

What about reference-style links? e.g. something like this:

{% foo() %}
    [Text][link]
{% end %}

[link]: https://example.com

This currently doesn't seem to work.

@Keats
Copy link
Collaborator

Keats commented Apr 6, 2023

No, shortcodes are isolated from the main markdown content.

@MaxIhlenfeldt
Copy link

I suppose that is by design and something like that will never work?

@Keats
Copy link
Collaborator

Keats commented Apr 6, 2023

Is your example using a .md shortcode? Looking back at it it should probably work in my mind?

@MaxIhlenfeldt
Copy link

I first had an HTML shortcode that used the markdown filter, because I didn't know .md shortcodes were possible, but I also can't get it to work with a .md shortcode.

@Keats
Copy link
Collaborator

Keats commented Apr 7, 2023

Hm I would expect the .md shortcodes to work, can you open an issue?

@MaxIhlenfeldt
Copy link

@Keats sorry, this got buried in my inbox for way too long... finally opened #2710.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants