mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
feat: add light prism theme for code blocks
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { ThemeConfig } from '@docusaurus/preset-classic'
|
||||
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github')
|
||||
// const darkCodeTheme = require('prism-react-renderer/themes/vsDark')
|
||||
const lightCodeTheme = require('@acid-info/logos-docusaurus-theme/lib/client/prism/light-theme')
|
||||
const darkCodeTheme = require('@acid-info/logos-docusaurus-theme/lib/client/prism/dark-theme')
|
||||
|
||||
export const baseThemeConfig: ThemeConfig = {
|
||||
@@ -23,7 +22,7 @@ export const baseThemeConfig: ThemeConfig = {
|
||||
copyright: `Logos, ${new Date().getFullYear()}`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
theme: lightCodeTheme.default,
|
||||
darkTheme: darkCodeTheme.default,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
// Original: https://raw.githubusercontent.com/PrismJS/prism-themes/master/themes/prism-ghcolors.css
|
||||
const theme = {
|
||||
plain: {
|
||||
color: '#393A34',
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
styles: [
|
||||
{
|
||||
types: ['comment', 'prolog', 'doctype', 'cdata'],
|
||||
style: {
|
||||
color: '#999988',
|
||||
fontStyle: 'italic',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['namespace'],
|
||||
style: {
|
||||
opacity: 0.7,
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['string', 'attr-value'],
|
||||
style: {
|
||||
color: '#e3116c',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['punctuation', 'operator'],
|
||||
style: {
|
||||
color: '#393A34',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: [
|
||||
'entity',
|
||||
'url',
|
||||
'symbol',
|
||||
'number',
|
||||
'boolean',
|
||||
'variable',
|
||||
'constant',
|
||||
'property',
|
||||
'regex',
|
||||
'inserted',
|
||||
],
|
||||
style: {
|
||||
color: '#36acaa',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['atrule', 'keyword', 'attr-name', 'selector'],
|
||||
style: {
|
||||
color: '#00a4db',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['function', 'deleted', 'tag'],
|
||||
style: {
|
||||
color: '#d73a49',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['function-variable'],
|
||||
style: {
|
||||
color: '#6f42c1',
|
||||
},
|
||||
},
|
||||
{
|
||||
types: ['tag', 'selector', 'keyword'],
|
||||
style: {
|
||||
color: '#00009f',
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
export default theme
|
||||
Reference in New Issue
Block a user