-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(syntax-highlighting): implement dynamic styles with Prism
- Disabled custom CLI styles to allow dynamic styles from Prism - Removed custom-prism-theme and custom-cli - Tested syntax highlighting for various supported languages - Removed dark theme due to issues with dynamic styles - Suggest combining default Prism styles with custom pkcli styles for optimal results
- Loading branch information
1 parent
48a587a
commit d2080e2
Showing
5 changed files
with
36 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,12 @@ | ||
import type { PrismTheme } from 'prism-react-renderer'; | ||
// import type { PrismTheme } from 'prism-react-renderer'; | ||
|
||
// To see changes in development restart docusaurus | ||
// // To see changes in development restart docusaurus | ||
|
||
const theme: PrismTheme = { | ||
plain: { | ||
color: '#F8F8F2', | ||
backgroundColor: '#282A36', | ||
}, | ||
styles: [ | ||
{ | ||
types: ['prolog', 'constant', 'builtin'], | ||
style: { | ||
color: 'rgb(189, 147, 249)', | ||
}, | ||
}, | ||
{ | ||
types: ['inserted', 'function'], | ||
style: { | ||
color: 'rgb(80, 250, 123)', | ||
}, | ||
}, | ||
{ | ||
types: ['deleted'], | ||
style: { | ||
color: 'rgb(255, 85, 85)', | ||
}, | ||
}, | ||
{ | ||
types: ['changed'], | ||
style: { | ||
color: 'rgb(255, 184, 108)', | ||
}, | ||
}, | ||
{ | ||
types: ['punctuation', 'symbol'], | ||
style: { | ||
color: 'rgb(248, 248, 242)', | ||
}, | ||
}, | ||
{ | ||
types: ['string', 'char', 'tag', 'selector'], | ||
style: { | ||
color: 'rgb(255, 121, 198)', | ||
}, | ||
}, | ||
{ | ||
types: ['keyword', 'variable'], | ||
style: { | ||
color: 'rgb(80, 250, 123)', | ||
}, | ||
}, | ||
{ | ||
types: ['command'], | ||
style: { | ||
color: 'rgb(167, 199, 231)', | ||
}, | ||
}, | ||
{ | ||
types: ['comment'], | ||
style: { | ||
color: 'rgb(98, 114, 164)', | ||
}, | ||
}, | ||
{ | ||
types: ['attr-name'], | ||
style: { | ||
color: 'rgb(241, 250, 140)', | ||
}, | ||
}, | ||
], | ||
}; | ||
export default theme; | ||
// const theme: PrismTheme = { | ||
// plain: { | ||
// color: '#F8F8F2', | ||
// backgroundColor: '#282A36', | ||
// }, | ||
// styles: [], | ||
// }; | ||
// export default theme; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters