feat: add github alerts support (#1095)
This commit is contained in:
@@ -24,6 +24,9 @@ import Providers, { mantineDefaultColorScheme, mantineTheme } from "./providers"
|
||||
|
||||
import "@crossbell/connect-kit/colors.css"
|
||||
import "@mantine/core/styles.css"
|
||||
import "remark-github-alerts/styles/github-colors-light.css"
|
||||
import "remark-github-alerts/styles/github-colors-dark-class.css"
|
||||
import "remark-github-alerts/styles/github-base.css"
|
||||
import "~/css/main.css"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -125,7 +128,7 @@ export default async function RootLayout({
|
||||
const messages = await getMessages()
|
||||
|
||||
return (
|
||||
<html lang={params.locale} className={colorScheme}>
|
||||
<html lang={params.locale} className={colorScheme} suppressHydrationWarning>
|
||||
<head>
|
||||
<ColorSchemeInjector />
|
||||
<ColorSchemeScript />
|
||||
|
||||
@@ -24,6 +24,7 @@ import remarkDirectiveRehype from "remark-directive-rehype"
|
||||
import emoji from "remark-emoji"
|
||||
import remarkFrontmatter from "remark-frontmatter"
|
||||
import remarkGfm from "remark-gfm"
|
||||
import remarkGithubAlerts from "remark-github-alerts"
|
||||
import remarkMath from "remark-math"
|
||||
import remarkParse from "remark-parse"
|
||||
import remarkRehype from "remark-rehype"
|
||||
@@ -104,6 +105,8 @@ export const renderPageContent = (
|
||||
try {
|
||||
let pipeline = unified()
|
||||
.use(remarkParse)
|
||||
// make sure this is before remarkBreaks
|
||||
.use(remarkGithubAlerts)
|
||||
.use(remarkBreaks)
|
||||
.use(remarkFrontmatter, ["yaml"])
|
||||
.use(() => (tree: Root) => {
|
||||
|
||||
Reference in New Issue
Block a user