diff --git a/.nvmrc b/.nvmrc index 7fd023741..13480246a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v16.15.0 +v18.14.1 \ No newline at end of file diff --git a/.tool-versions b/.tool-versions index eedff58c8..ac4d6020f 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -nodejs 16.16.0 +nodejs 18.14.1 diff --git a/astro.config.ts b/astro.config.ts index 00e9a466b..1dd265072 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -5,7 +5,6 @@ import svgr from "vite-plugin-svgr" import astroI18next from "astro-i18next" import { astroCallouts, asideAutoImport } from "./integrations/astro-callouts" import { solidityRemixCode, codeSampleAutoImport } from "./integrations/solidity-remix" -import { youtubeEmbed } from "./integrations/youtube-embed" import mdx from "@astrojs/mdx" import rehypeSlug from "rehype-slug" import rehypeAutolinkHeadings from "rehype-autolink-headings" @@ -13,7 +12,6 @@ import rehypeKatex from "rehype-katex" import rehypeMermaid from "rehype-mermaidjs" import remarkGfm from "remark-gfm" import remarkMath from "remark-math" -import image from "@astrojs/image" import AutoImport from "astro-auto-import" import sitemap from "@astrojs/sitemap" @@ -23,6 +21,7 @@ import tailwind from "@astrojs/tailwind" // https://astro.build/config export default defineConfig({ site: "https://docs.scroll.io", + scopedStyleStrategy: "where", legacy: { astroFlavoredMarkdown: true, }, @@ -39,14 +38,11 @@ export default defineConfig({ }), astroCallouts(), solidityRemixCode(), - youtubeEmbed(), mdx(), - image(), tailwind({ - // Example: Disable injecting a basic `base.css` import on every page. - // Useful if you need to define and/or import your own custom `base.css`. - config: { applyBaseStyles: false }, + applyBaseStyles: false, }), + astroI18next(), ], vite: { @@ -61,7 +57,14 @@ export default defineConfig({ [ rehypeAutolinkHeadings, { - behavior: "append", + behavior: "wrap", + properties: {}, + content: { + type: "element", + tagName: "span", + properties: { className: ["icon", "icon-link"] }, + children: [], + }, }, ], [ diff --git a/integrations/youtube-embed.ts b/integrations/youtube-embed.ts deleted file mode 100644 index 85b3f191a..000000000 --- a/integrations/youtube-embed.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Add Youtube import to MD pages. - * Remove when astro supports 3rd party integration officially. - */ - -import type { AstroIntegration } from "astro" - -const CodeSampleTagName = "YouTube" -/** - * Astro integration that sets up the remark plugin and auto-imports the `