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

docs: redesign code highlights + add default code titles #8628

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

shahednasser
Copy link
Member

@shahednasser shahednasser commented Aug 16, 2024

  • change the colors for highlights by user, line highlights, and token highlights.
  • Add default title for code blocks if none provided.
  • Show a different icon at the beginning of a code block if text is a bash script. While I tested this out in multiple pages this may lead to some inconsistencies found in deeper pages but we can fix them as we find them

Closes DOCS-868, DOCS-904, DOCS-901

Preview: https://docs-v2-git-docs-code-highlights-medusajs.vercel.app/v2

@shahednasser shahednasser requested a review from a team as a code owner August 16, 2024 13:10
Copy link

vercel bot commented Aug 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference 🔄 Building (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
api-reference-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
docs-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
resources-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 19, 2024 7:47am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Aug 19, 2024 7:47am

Copy link

changeset-bot bot commented Aug 16, 2024

⚠️ No Changeset found

Latest commit: 6267e8d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@olivermrbl
Copy link
Contributor

The curl snippet looks off, would probably also have the > here:

CleanShot 2024-08-18 at 17 01 48

@shahednasser
Copy link
Member Author

@olivermrbl nice catch! will fix it

@shahednasser
Copy link
Member Author

@olivermrbl I added some padding to one-liner code snippets which we don't show line numbers for. I didn't add the terminal prefix to curl commands because for multi-line ones it'll become hacky (for curl commands you only show the > prefix for the first line, whereas for other terminal code snippets you'd show the > for every line).

@olivermrbl
Copy link
Contributor

@shahednasser, makes sense. Looks good now 👍

@shahednasser shahednasser merged commit a77c23c into develop Aug 19, 2024
32 checks passed
@shahednasser shahednasser deleted the docs/code-highlights branch August 19, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants