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

page.summary only works when isolated on a newline. #2562

Open
digitalillusions opened this issue Jul 1, 2024 · 5 comments
Open

page.summary only works when isolated on a newline. #2562

digitalillusions opened this issue Jul 1, 2024 · 5 comments

Comments

@digitalillusions
Copy link

Bug Report

I've upgraded from Zola 0.18.0 to 0.19.1 today and found that my use of page.summary is broken.

When writing the <!-- more --> tag inline into markdown content, the page.summary variable does not get populated. For example

Hello hello <!-- more --> this is a test.

will not work. However,

Hello hello
<!-- more -->
this is a test

will work. Unfortunately, this will add a newline between Hello hello and this is a test when using page.content, which is a bummer because now I cant take part of a paragraph as a page summary anymore.

It would be cool to get back the functionality for <!-- more --> to be inlinable. I assume this might have something to do with the recent fix for footnotes?

Environment

Zola version: 0.19.1

@Keats
Copy link
Collaborator

Keats commented Jul 1, 2024

It might be related to the pulldown-cmark update, I don't see other changes that could be related (other than the regex change but that shouldn't change anything there).

Honestly I don't think it was ever intented to work the inline way? We're looking for it in the HTML event and the actual intent was always to have it be on a new line.

@digitalillusions
Copy link
Author

Ah, I see. Well, it was a very nice feature to have, since I don't always want to have a full paragraph in the summary, but maybe just a few sentences.

In any case, I think the docs could mention the limitations of the <!-- more --> tag.

@ChrisRenfrow
Copy link

I came here because I noticed the same thing, looks like this bug I and others depended on as a feature can no longer be exploited. 😄

welpo added a commit to welpo/osc.garden that referenced this issue Jul 2, 2024
Bug (or feature removed) introduced in 0.19: getzola/zola#2562
@Keats
Copy link
Collaborator

Keats commented Jul 3, 2024

Did you never have issues with unclosed HTML tags by using it inline? Since we just slice the rendered content it's unlikely the HTML would be valid in a lot of cases

@digitalillusions
Copy link
Author

Sorry, I totally forgot to reply. It indeed causes an unclosed <p> tag for me, which now that I know about it is obviously not ideal. I never actually noticed this, because the rendered HTML never showed any artifacts. I will just lave this comment here for completeness in case anyone else stumbles across this issue.

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