Skip to content

Commit

Permalink
πŸ‘©β€πŸŽ¨ Document accepts renderers as a prop (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejpurves authored Apr 10, 2024
1 parent 629b2a6 commit 2a532d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/famous-forks-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@myst-theme/site': patch
---

Add renderers as a prop to Document
5 changes: 4 additions & 1 deletion packages/site/src/pages/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { SiteManifest } from 'myst-config';
import type { SiteLoader } from '@myst-theme/common';
import type { NodeRenderer } from '@myst-theme/providers';
import { BaseUrlProvider, SiteProvider, Theme, ThemeProvider } from '@myst-theme/providers';
import {
Links,
Expand All @@ -12,7 +13,7 @@ import {
Link,
NavLink,
} from '@remix-run/react';
import { DEFAULT_NAV_HEIGHT, renderers } from '../components/index.js';
import { DEFAULT_NAV_HEIGHT, renderers as defaultRenderers } from '../components/index.js';
import { Analytics } from '../seo/index.js';
import { Error404 } from './Error404.js';
import classNames from 'classnames';
Expand All @@ -26,6 +27,7 @@ export function Document({
staticBuild,
baseurl,
top = DEFAULT_NAV_HEIGHT,
renderers = defaultRenderers,
}: {
children: React.ReactNode;
scripts?: React.ReactNode;
Expand All @@ -35,6 +37,7 @@ export function Document({
staticBuild?: boolean;
baseurl?: string;
top?: number;
renderers?: Record<string, NodeRenderer>;
}) {
const links = staticBuild
? {
Expand Down

0 comments on commit 2a532d7

Please sign in to comment.