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

Code-formatted text is white on a white background, making it hard to see #52

Closed
aSemy opened this issue Aug 18, 2024 · 2 comments · Fixed by #63
Closed

Code-formatted text is white on a white background, making it hard to see #52

aSemy opened this issue Aug 18, 2024 · 2 comments · Fixed by #63

Comments

@aSemy
Copy link

aSemy commented Aug 18, 2024

Most of the code snippets in this blog are rendered as white on a light background, meaning they are difficult to see.

https://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html

image
@DavidSpickett
Copy link
Contributor

I didn't see this with Chrome but did with Firefox (perhaps there is some dark mode setting difference).

This article is actually in the repo as an HTML file, it seems that all articles before some point in 2020 are. After that they are Markdown and use a theme (https://github.com/avianto/hugo-kiera).

Articles that use the theme are ok, the HTML ones are not because they hard code the background colour for this.

Thanks for bringing this to our attention. I'm not sure we will be able to fix it though. I wonder if converting the HTML files to back to Markdown would be possible.

@aSemy
Copy link
Author

aSemy commented Nov 15, 2024

Hi, thanks for looking into it. I am using Chrome (with darkmode enabled), so I wonder why you saw a difference.

DavidSpickett added a commit to DavidSpickett/llvm-blog-www that referenced this issue Nov 15, 2024
Fixes llvm#52

Sort of. Articles pre-sometime in 2020 are in HTML form and with
https://github.com/JohannesKaufmann/html-to-markdown they convert
pretty well but not enough to mass convert them.

But since I put the effort into trying it I figured I would clean
up this one that had been noticed.

I used a script to reformat the header, html2markdown to
convert and then added back some plain text/monospace/code markers
where they had been missed, and removed some escapes that got added
because those plaintext bits weren't marked properly.

Now that it's Markdown, Hugo's theme will apply and produce the
right colours for light and dark mode.

The URL of the post will be the same.
@asl asl closed this as completed in #63 Nov 27, 2024
@asl asl closed this as completed in a395649 Nov 27, 2024
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

Successfully merging a pull request may close this issue.

2 participants