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

feat(docs): highlight code block #831

Merged
merged 6 commits into from
Oct 28, 2024
Merged

Conversation

zhangmo8
Copy link
Contributor

@zhangmo8 zhangmo8 commented Oct 25, 2024

πŸ”— Linked issue

close #829

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

highlight the demo code block

πŸ“Έ Screenshots (if appropriate)

before:
image

after:
image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@sadeghbarati
Copy link
Collaborator

#372

@zhangmo8
Copy link
Contributor Author

zhangmo8 commented Oct 26, 2024

shadcn has code theme now @sadeghbarati

Do I need to change it to the same theme as him?

@sadeghbarati
Copy link
Collaborator

Ahh, yes You are right, please go with github-dark-default light-mode for code section is a bit odd

@zhangmo8
Copy link
Contributor Author

zhangmo8 commented Oct 28, 2024

Hi @sadeghbarati I looked up the mdx themes used by shadcn, and I thought if we could add a code theme option to the header so that users could choose their favorite code theme

Now it's

image

@zhangmo8
Copy link
Contributor Author

Maybe it will be like this. What do you think? @sadeghbarati

image

@sadeghbarati
Copy link
Collaborator

@zhangmo8 It's nice to have this, but I think one code theme is enough
I'm in your branch right now and using shiki/themes/github-dark-default.mjs

image

@zhangmo8
Copy link
Contributor Author

@zhangmo8 It's nice to have this, but I think one code theme is enough I'm in your branch right now and using shiki/themes/github-dark-default.mjs

Alright, I've changed the theme to github-xx-default. If needed, I can submit the code for the theme switching functionality later.

Copy link
Collaborator

@sadeghbarati sadeghbarati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks πŸ™

@sadeghbarati sadeghbarati merged commit 52b9b20 into unovue:dev Oct 28, 2024
1 check passed
@sadeghbarati
Copy link
Collaborator

@zhangmo8 Could you please check BlockContainer.vue seems to be using the previous shiki way cssVariables

@zhangmo8
Copy link
Contributor Author

It seems that I have missed something. Sorry for any inconvenience caused. I will submit another pull request to fix it. @sadeghbarati

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 this pull request may close these issues.

[Feature]: Docs Highlight the demo code with shiki
2 participants