Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions docs-src/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config

import { themes as prismThemes } from 'prism-react-renderer';
import type { Config } from '@docusaurus/types';
import rehypeShiki from '@shikijs/rehype';

/** @type {import('@docusaurus/types').Config} */
const config: Config = {
Expand Down Expand Up @@ -128,6 +128,28 @@ const config: Config = {
breadcrumbs: false,
// I disabled the editUrl because it just confuses users and does not look professional
// editUrl: 'https://github.com/pubkey/rxdb/tree/master/docs-src/',
rehypePlugins: [
[
rehypeShiki,
{
themes: {
light: 'dracula',
dark: 'dracula',
},
langs: [
'javascript',
'typescript',
'json',
'bash',
'graphql',
'html',
'css',
'jsx',
'tsx',
],
},
],
],
},
// blog: {
// showReadingTime: true,
Expand Down Expand Up @@ -218,11 +240,6 @@ const config: Config = {
links: [],
copyright: ' ',
},
prism: {
theme: prismThemes.dracula,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'json', 'graphql', 'typescript', 'javascript'],
},
},
};

Expand Down
3 changes: 2 additions & 1 deletion docs-src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@docusaurus/plugin-google-gtag": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@mdx-js/react": "3.1.1",
"@shikijs/rehype": "3.14.0",
"antd": "5.27.6",
"autocomplete.js": "0.37.0",
"clsx": "2.1.1",
Expand All @@ -30,12 +31,12 @@
"lunr-languages": "1.14.0",
"mark.js": "8.11.1",
"minimatch": "3.0.4",
"prismjs": "1.30.0",
"react": "19.2.0",
"react-countup": "6.5.3",
"react-dom": "19.2.0",
"react-tagcloud": "2.3.3",
"rehype-parse": "7.0.1",
"shiki": "3.14.0",
"to-vfile": "6.1.0",
"unified": "9.0.0",
"unist-util-is": "4.0.2"
Expand Down