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: allow to use custom syntax highlighting themes #992

Merged
merged 4 commits into from
Jul 15, 2022
Merged

feat: allow to use custom syntax highlighting themes #992

merged 4 commits into from
Jul 15, 2022

Conversation

azat-io
Copy link
Contributor

@azat-io azat-io commented Jul 14, 2022

Adds the ability to import custom themes for syntax highlighting.

import { loadTheme } from 'shiki'
import { join } from 'path'

export default async () => {
    let theme = await loadTheme(join(__dirname, './my-theme.json'))
    return defineConfig({
      title: 'VitePress',

      markdown: {
        theme,
      },
     // ...
  })
}

Screenshot 2022-07-14 at 11 46 52 PM

@azat-io
Copy link
Contributor Author

azat-io commented Jul 15, 2022

@brc-dd Should I rebase this PR to this branch #856 ?

@brc-dd
Copy link
Member

brc-dd commented Jul 15, 2022

No, keep it for main. I'll test this one out as soon as I get some time.

@brc-dd brc-dd merged commit d5ed66c into vuejs:main Jul 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants