mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
try using shaki theme
This commit is contained in:
1 parent
18fd4ef46f
commit
3a009f5395
2 files changed
+3
-8
No files matched your search
@@ -4,7 +4,8 @@ import matter from 'gray-matter'
|
||||
import { serialize } from 'next-mdx-remote/serialize'
|
||||
|
||||
import { remarkCodeHike } from '@code-hike/mdx'
|
||||
import codeHikeTheme from '~/codeHikeTheme.js'
|
||||
// import codeHikeTheme from '~/codeHikeTheme.js'
|
||||
import theme from 'shiki/themes/solarized-dark.json'
|
||||
|
||||
async function generateRefMarkdown(sections, slug) {
|
||||
let markdownContent = []
|
||||
@@ -45,7 +46,7 @@ async function generateRefMarkdown(sections, slug) {
|
||||
// MDX's available options, see the MDX docs for more info.
|
||||
// https://mdxjs.com/packages/mdx/#compilefile-options
|
||||
mdxOptions: {
|
||||
remarkPlugins: [[remarkCodeHike, { autoImport: false, codeHikeTheme }]],
|
||||
remarkPlugins: [[remarkCodeHike, { autoImport: false, theme }]],
|
||||
useDynamicImport: true,
|
||||
},
|
||||
// Indicates whether or not to parse the frontmatter from the mdx source
|
||||
|
||||
@@ -7,8 +7,6 @@ import { flattenSections } from '~/lib/helpers'
|
||||
import handleRefGetStaticPaths from '~/lib/mdx/handleRefStaticPaths'
|
||||
import handleRefStaticProps from '~/lib/mdx/handleRefStaticProps'
|
||||
|
||||
import * as shiki from 'shiki'
|
||||
|
||||
const sections = flattenSections(clientLibsCommonSections)
|
||||
|
||||
export default function JSReference(props) {
|
||||
@@ -16,10 +14,6 @@ export default function JSReference(props) {
|
||||
}
|
||||
|
||||
export async function getStaticProps({ params }: { params: { slug: string[] } }) {
|
||||
const forceShiki = await shiki.getHighlighter({
|
||||
theme: 'github-light',
|
||||
})
|
||||
|
||||
return handleRefStaticProps(sections, params, '/js', '/javascript')
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user