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

setting minify_html breaks page formatting on pages with numbered code blocks #84

Closed
skewballfox opened this issue Jul 20, 2022 · 9 comments

Comments

@skewballfox
Copy link

I'm not sure if this is a bug or not, but currently setting minify_html=true causes the table of contents to be rendered at the bottom of the post(after go to top) rather than the side.

@Jieiku
Copy link
Owner

Jieiku commented Jul 21, 2022

Thanks for the report, Will try and reproduce this now.

EDIT: Was unable to reproduce this on a fresh git clone, so it is probably some combination of options that causes it.

Do you have a repo I can clone to reproduce this? Or perhaps you can share a redacted config.toml?

If you have not yet, try coping the config.toml from abridge into your root site, and only make a couple changes at a time between trying zola serve.

@simbleau
Copy link
Contributor

Issue is getting stale. @skewballfox Are you still having issues?

@skewballfox
Copy link
Author

yes, unless it's something specific to my system I'm pretty sure you can test this yourself.

git clone https://github.com/Jieiku/abridge
cd abridge
sed -i 's/minify_html = false/minify_html = true/g' config.toml
zola serve --port 1234

then navigate to the local copy of the code blocks entry, and you should see a missing Index box, which is now improperly renderered after the body of the post

@simbleau
Copy link
Contributor

Thanks, will look into this.

@Jieiku
Copy link
Owner

Jieiku commented Jul 25, 2022

@skewballfox Thanks! I just followed your example to the letter.

What Operating System, Browser, and resolution are you using?

here is Firefox:

2022-07-24_18-45-45

here is chrome:

2022-07-24_18-46-34

@skewballfox
Copy link
Author

not quite, I'm talking about the page Code blocks and themes, not the index/list of post. I was using that specific post as an example, but the issue will be present for any post which has multiple headings

image
here is the table of contents for that page rendered below the post when minified. it's correct when not minified though

I've used firefox and chrome on fedora 36, resolution should be 1080p

@Jieiku
Copy link
Owner

Jieiku commented Jul 25, 2022

Perfect, I see the issue as well. This is a new issue, I am able to reproduce this and will figure out the cause.

With minify=true the rich content and image shortcodes pages do not have this issue, but the code blocks and markdown pages both do.

I definitely think it has to do with the code blocks, will keep investigating.

It actually looks like it is the numbered code blocks that are causing the problem, going to try removing them and see what happens.

EDIT: YEP! its the line numbered code blocks that cause this problem, now I just need to investigate if this is abridge specific or an issue with zola, if it turns out to be an issue with zola then I will open a bug report there and link to this issue.

@Jieiku
Copy link
Owner

Jieiku commented Jul 25, 2022

I was able to reproduce this with another theme, so it does not appear to be abridge specific: https://github.com/Jieiku/zola-minify-test

@Jieiku Jieiku changed the title setting minify_html breaks side display of Index/TOC for page setting minify_html breaks page formatting on pages with numbered code blocks Jul 27, 2022
@Jieiku
Copy link
Owner

Jieiku commented Aug 9, 2022

Closing because it is unrelated to Abridge, for now I simply disabled the minify_html option.

@Jieiku Jieiku closed this as completed Aug 9, 2022
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