Skip to content

Commit

Permalink
feat: set Shiki theme to github theme
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianWowra committed Aug 8, 2024
1 parent 989d84e commit 973f75d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/GitHubTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ export class GitHubTheme extends DefaultTheme {
<link rel="stylesheet" href={event.relativeURL('assets/typedoc-github-style.css')} />
</>
));

// set the Shiki theme
this.application.on('bootstrapEnd', () => {
if (!this.application.options.isSet('lightHighlightTheme')) {
this.application.options.setValue('lightHighlightTheme', 'github-light-default');
}

if (!this.application.options.isSet('darkHighlightTheme')) {
this.application.options.setValue('darkHighlightTheme', 'github-dark-default');
}
});
}

getRenderContext(pageEvent: PageEvent<Reflection>) {
Expand Down

0 comments on commit 973f75d

Please sign in to comment.