You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve rendering of code blocks / code listings #211
We are a technical project, and we'll probably show source code and code listings on our website every now and then.
Thus, it would be great if such code listings would fit into the overall theme and look better.
Right now, code blocks are hard to read due to a small font size.
I think a layout similar to how this is rendered here on Github would be a good improvement. Ideally, we'd also support language tags to get code highlighting.
Hi, i've fixed the font size and imported the prism CSS style sheet.
it now looks better:
For better syntax highlighting tailored for a specific language, like in the example below, the language must be specified in the md file above the code blocks.
Addressed by #265: code blocks on the new Astro site render at a readable size. Syntax highlighting already comes from Astro's built-in Shiki; blocks need a language tag after the opening fence to be highlighted. Closing now, with #265 pending merge.
Activity
[-]Improve rendering of source code[/-][+]Improve rendering of code blocks / code listings[/+]Rukki13 commentedon Apr 30, 2024
Hi, i've fixed the font size and imported the prism CSS style sheet.



it now looks better:
For better syntax highlighting tailored for a specific language, like in the example below, the language must be specified in the md file above the code blocks.
Rukki13 commentedon Apr 30, 2024
I've made a pull request here: #243
soloturn commentedon Nov 11, 2026
Addressed by #265: code blocks on the new Astro site render at a readable size. Syntax highlighting already comes from Astro's built-in Shiki; blocks need a language tag after the opening fence to be highlighted. Closing now, with #265 pending merge.