Skip to content

Commit

Permalink
add more components
Browse files Browse the repository at this point in the history
  • Loading branch information
zzq0826 committed Jun 27, 2024
1 parent f5e7cb2 commit 3761f2b
Show file tree
Hide file tree
Showing 13 changed files with 23,005 additions and 46 deletions.
40 changes: 34 additions & 6 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import rehypeMermaid from "rehype-mermaidjs"
import remarkGfm from "remark-gfm"
import remarkMath from "remark-math"
import AutoImport from "astro-auto-import"

import sitemap from "@astrojs/sitemap"

import tailwind from "@astrojs/tailwind"

import expressiveCode from "astro-expressive-code"

// https://astro.build/config
export default defineConfig({
site: "https://docs.scroll.io",
Expand All @@ -32,18 +32,39 @@ export default defineConfig({
preact({
compat: true,
}),

sitemap({
changefreq: "daily",
}),
astroCallouts(),
solidityRemixCode(),
expressiveCode({
themes: ["dracula", "solarized-light"],
frames: {
// extractFileNameFromCode: false,
},
defaultProps: {
frame: "code",
},
styleOverrides: {
borderRadius: "27px",
borderColor: "transparent",
// focusBorder: 'transparent',
// scrollbarThumbColor: 'transparent',
// codeBackground: "red",
// You can optionally override the plugin's default styles here
frames: {
shadowColor: "transparent",
editorTabBorderRadius: "0.5rem",
editorBackground: "#2b2b2b",
},
// extractFileNameFromCode: false,
},
}),
mdx(),
tailwind({
applyBaseStyles: false,
nesting: true,
}),

astroI18next(),
],
vite: {
Expand All @@ -54,7 +75,12 @@ export default defineConfig({
remarkPlugins: [remarkMath, remarkGfm],
rehypePlugins: [
rehypeSlug,
[rehypeMermaid, { strategy: "img-png" }],
[
rehypeMermaid,
{
strategy: "img-png",
},
],
[
rehypeAutolinkHeadings,
{
Expand All @@ -63,7 +89,9 @@ export default defineConfig({
content: {
type: "element",
tagName: "span",
properties: { className: ["icon", "icon-link"] },
properties: {
className: ["icon", "icon-link"],
},
children: [],
},
},
Expand Down
Loading

0 comments on commit 3761f2b

Please sign in to comment.