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

Broken shortcodes on 0.19 #2565

Open
1player opened this issue Jul 3, 2024 · 10 comments · Fixed by #2606
Open

Broken shortcodes on 0.19 #2565

1player opened this issue Jul 3, 2024 · 10 comments · Fixed by #2606

Comments

@1player
Copy link

1player commented Jul 3, 2024

I had a shortcode called email which contained my email address for reasons, and used it as such

<a name="contact-me" href="mailto:{{ email() }}">{{ email() }}</a>

This used to work but I have since upgraded to 0.19.1 and it simply outputs @@ZOLA_SC_PLACEHOLDER@@

I had to move the entire tag into the shortcode for it to work again, but this smells like a bug and a regression to me.

@Keats
Copy link
Collaborator

Keats commented Jul 3, 2024

You had that line the markdown right? If so might be a regression in shortcodes in HTML due to the pulldown-cmark update.

@jcla1
Copy link

jcla1 commented Jul 25, 2024

I am also having this issue. On a markdown page I have multiple a-hrefs and use a shortcode to link to static resources. They now, on most pages, show up as @@ZOLA_SC_PLACEHOLDER@@. Weird is though that it's not on all pages - more recently updated ones (but with the same a-href and shortcode) don't seem to suffer this issue.

@Keats
Copy link
Collaborator

Keats commented Jul 25, 2024

Can you share an example md file that has the issue?

@jcla1
Copy link

jcla1 commented Jul 25, 2024

Here are some example files - the first one, with zola's current version, produces links where the final bit of the URL is the placeholder (not the whole URL). The second markdown file produces the correct links.

numerik1_ss2021.md
analysis2_ss2024.md

I've checked this again, by deleting the public directory and then doing a clean build with zola v0.19.1.

@jcla1
Copy link

jcla1 commented Jul 25, 2024

For anyone using zola via homebrew: I found a nice guide that explains how to get an older version of a formula. I'm now back on v0.18.0 and that doesn't have the issue with the placeholder.

@Keats
Copy link
Collaborator

Keats commented Jul 25, 2024

Ok I can reproduce it with your files. For some reasons it's the

2021-07-26: **Das Ferientutorium zur Numerik I wird vom 20. September bis zum
24. September täglich von 10 bis 16 Uhr via [WebEx][15] stattfinden. Es wird
veranstaltet von Melinda Hagedorn, die freundlicherweise bereits <a href="{{ get_url(path = "static/numerik1_ss2021/zusatzuebungen.pdf") }}">Aufgaben
zum selbststudium</a> bereit gestellt hat, die im Laufe des Tutoriums dann
besprochen werden können. Eine Anmeldung ist nicht erforderlich.**

paragraph that causes issues. If i remove the HTML tag in there it does render the rest fine 🤔

@LunarEclipse363
Copy link
Contributor

You had that line the markdown right? If so might be a regression in shortcodes in HTML due to the pulldown-cmark update.

IIRC I tracked this down to 13682e1 specifically at some point so yeah.

@Keats
Copy link
Collaborator

Keats commented Aug 3, 2024

If anyone is interested, since we have a repro above, we should be able to write tests and fix it somewhat easily. It could be a good first issue!

@amtanq
Copy link
Contributor

amtanq commented Aug 7, 2024

Working on this

@amtanq
Copy link
Contributor

amtanq commented Aug 7, 2024

Raised a fix: #2601
Edit: Better fix by @clarfonthey -> #2606

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

Successfully merging a pull request may close this issue.

5 participants