Skip to content

Commit

Permalink
docs: change highlighter theme
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-ub committed Oct 22, 2024
1 parent 20c4b18 commit b7df536
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 386 deletions.
3 changes: 1 addition & 2 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { defineConfig } from 'astro/config'

import { visit } from 'unist-util-visit'
import { siteConfig } from './src/config/site'
import blackout from './theme/dark.json'

// Función recursiva para extraer todos los valores de texto
function extractText(node) {
Expand Down Expand Up @@ -48,7 +47,7 @@ export default defineConfig({
],
markdown: {
shikiConfig: {
theme: blackout,
theme: 'github-dark-default',
transformers: [transformerMetaHighlight()],
},
rehypePlugins: [
Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/component-preview/ComponentSource.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import process from 'node:process'
import { styles } from '@/registry/registry-styles'
import { ui } from '@/registry/registry-ui'
import { Code as CodeAstro } from 'astro/components'
import blackout from '../../../theme/dark.json'
import { CopyButton } from '../copy-button'
import { Select, SelectContent, syncKey } from './select'
Expand Down Expand Up @@ -49,7 +48,7 @@ const allComponents = componentUi?.files?.flatMap((file) => {
{code
? (
<div class="relative">
<CodeAstro code={code} lang="ts" theme={JSON.parse(JSON.stringify(blackout))} class="mb-4 mt-6 max-h-[650px] overflow-x-auto rounded-lg border !bg-zinc-950 py-4 dark:!bg-zinc-900 px-4" />
<CodeAstro code={code} lang="ts" theme="github-dark-default" class="mb-4 mt-6 max-h-[650px] overflow-x-auto rounded-lg border !bg-zinc-950 py-4 dark:!bg-zinc-900 px-4" />
<CopyButton client:load {...{ rawString: code, withMeta: false }} />
</div>
)
Expand Down
3 changes: 1 addition & 2 deletions docs/src/components/component-preview/RawCode.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import { Code as CodeAstro } from 'astro/components'
import blackout from '../../../theme/dark.json'
import { CopyButton } from '../copy-button'
Expand All @@ -12,6 +11,6 @@ const { code } = Astro.props
---

<div data-raw-code class="relative">
<CodeAstro code={code} lang="ts" theme={JSON.parse(JSON.stringify(blackout))} class="mb-4 mt-6 max-h-[650px] overflow-x-auto rounded-lg border !bg-zinc-950 py-4 dark:!bg-zinc-900 px-4" />
<CodeAstro code={code} lang="ts" theme="github-dark-default" class="mb-4 mt-6 max-h-[650px] overflow-x-auto rounded-lg border !bg-zinc-950 py-4 dark:!bg-zinc-900 px-4" />
<CopyButton client:load {...{ rawString: code, withMeta: false }} />
</div>
Loading

0 comments on commit b7df536

Please sign in to comment.