-
Notifications
You must be signed in to change notification settings - Fork 581
feat: improve code block feature with Expressive Code #330
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'm currently reviewing your repository. I've switched the light theme to rose-pine-dawn for better clarity. Everything seems to be working fine, but am I missing something? One possibility is that the theme change might still be referencing cached data. Refreshing the page might resolve it. Additionally, one noticeable difference between github-light and light-plus themes is the red line on the tabs. I believe the provided image is indeed from the light-plus theme. |
Sorry I mean the language badge part. |
The conditions for the badge to appear are as follows: .frame:not(.has-title):not(.is-terminal) You can check this in The reason for this is to avoid redundancy and clutter on the screen:
I don't think this is the best approach, but if you prefer to have the badge always displayed, you can simply modify the CSS. |
related: #275 |
Hello, there is an issue with the long labels on their own lines from https://expressive-code.com/key-features/text-markers/ renders like this in a vercel/netlify project : The sentence is not displayed : Codeblock in md file: import time
# Quick, count to ten!
for i in range(10):
# (but not *too* quick)
time.sleep(0.5)
print i With ```python {"test badge":2-5} at first. Work in local but breaked with vercel/netlify... |
@didntchooseaname Variables are broken in PROD mode, but the cause is still unknown. |
@didntchooseaname // astro.config.mjs
...
export default defineConfig({
...
integrations: [
...,
icon({
include: {
"preprocess: vitePreprocess(),": ["*"],
"fa6-brands": ["*"],
"fa6-regular": ["*"],
"fa6-solid": ["*"],
},
}),
svelte(),
sitemap(),
Compress({
CSS: false,
HTML: false, // Add this
Image: false,
Action: {
Passed: async () => true, // https://github.com/PlayForm/Compress/issues/376
},
}),
expressiveCode({ Currently testing a method to resolve the issue while keeping the compression enabled. |
I confirm that astro-compress cause the issue there, here is the result without: |
I've fixed an issue where astro-compress interfered with Expressive Code. While it may not be a perfect solution, it effectively addresses the problem. Additionally, I’ve added a new document for visual review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add margin to code block.
.expressive-code {
@apply mb-6;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the suggestion. This feature is in the proposal phase, maintaining Expressive Code defaults.
6e4966c
to
0a05461
Compare
I noticed that Expressive Code was briefly mentioned in #319, so I tried replacing the existing code block implementation with it.
Please note that this is a large-scale change, and there are still open issues related to the previous implementation.
For now, I’ve kept the features and design minimal.
Related open issues: #275
Related open PRs: #208 #283
close #319