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: shiki magic move integration #1336

Merged
merged 5 commits into from Feb 26, 2024
Merged

feat: shiki magic move integration #1336

merged 5 commits into from Feb 26, 2024

Conversation

antfu
Copy link
Member

@antfu antfu commented Feb 25, 2024

Here is the example usage:

# Shiki Magic Move
(this feature is still experimental)
Powered by [shiki-magic-move](https://shiki-magic-move.netlify.app/), Slidev supports animations across multiple code snippets.
Add multiple code blocks and wrap them with <code>````md magic-move</code> (four backticks) to enable the magic move. For example:
````md magic-move
```ts
const author = reactive({
name: 'John Doe',
books: [
'Vue 2 - Advanced Guide',
'Vue 3 - Basic Guide',
'Vue 4 - The Mystery'
]
})
```
```ts
export default {
data() {
return {
author: {
name: 'John Doe',
books: [
'Vue 2 - Advanced Guide',
'Vue 3 - Basic Guide',
'Vue 4 - The Mystery'
]
}
}
}
}
```
```ts
export default {
data: () => ({
author: {
name: 'John Doe',
books: [
'Vue 2 - Advanced Guide',
'Vue 3 - Basic Guide',
'Vue 4 - The Mystery'
]
}
})
}
```
````

Screen.Recording.2024-02-26.at.13.33.13.mov

@antfu antfu marked this pull request as draft February 26, 2024 00:00
@antfu antfu marked this pull request as ready for review February 26, 2024 12:39
@antfu antfu merged commit 29a6131 into main Feb 26, 2024
8 checks passed
@antfu antfu deleted the feat/shiki-magic-move branch February 26, 2024 12:41
@antfu antfu mentioned this pull request Feb 26, 2024
9 tasks
@John98Zakaria
Copy link
Contributor

Please tell me if I could help with that feature, I was working on implementing it myself, but now I don't need to 😅

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.

None yet

2 participants