Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve docs build failures on app router branch #803

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down
4 changes: 2 additions & 2 deletions www/components/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export function Video({
<Image
src={image}
layout="responsive"
width="1600px"
height="900px"
width="1600"
height="900"
alt="Thumbnail"
/>
</div>
Expand Down
5 changes: 3 additions & 2 deletions www/pages/blog/[...slug].tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getMdxNode, getMdxPaths } from "next-mdx/server"
import { useHydrate } from "next-mdx/client"
import { MdxRemote } from "next-mdx-remote/types"

import { Blog } from "types"
import { Layout } from "components/layout"
Expand All @@ -11,7 +12,7 @@ export interface BlogsPageProps {

export default function BlogsPage({ blog }: BlogsPageProps) {
const content = useHydrate(blog, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
})

return (
Expand Down Expand Up @@ -42,7 +43,7 @@ export async function getStaticPaths() {

export async function getStaticProps(context) {
const blog = await getMdxNode("blog", context, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
mdxOptions: {
remarkPlugins: [
require("remark-slug"),
Expand Down
5 changes: 3 additions & 2 deletions www/pages/docs/[[...slug]].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getMdxNode, getMdxPaths } from "next-mdx/server"
import { useHydrate } from "next-mdx/client"
import { getTableOfContents, TableOfContents } from "next-mdx-toc"
import { MdxRemote } from "next-mdx-remote/types"

import { Doc } from "types"
import { docsConfig } from "config/docs"
Expand All @@ -17,7 +18,7 @@ export interface DocsPageProps {

export default function DocsPage({ doc, toc }: DocsPageProps) {
const content = useHydrate(doc, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
})

return (
Expand Down Expand Up @@ -65,7 +66,7 @@ export async function getStaticPaths() {

export async function getStaticProps(context) {
const doc = await getMdxNode("doc", context, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
mdxOptions: {
remarkPlugins: [
require("remark-slug"),
Expand Down
5 changes: 3 additions & 2 deletions www/pages/guides/[...slug].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getMdxNode, getMdxPaths } from "next-mdx/server"
import { useHydrate } from "next-mdx/client"
import { getTableOfContents, TableOfContents } from "next-mdx-toc"
import { MdxRemote } from "next-mdx-remote/types"

import { Guide } from "types"
import { guidesConfig } from "config/guides"
Expand All @@ -17,7 +18,7 @@ export interface GuidesPageProps {

export default function GuidesPage({ guide, toc }: GuidesPageProps) {
const content = useHydrate(guide, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
})

return (
Expand Down Expand Up @@ -68,7 +69,7 @@ export async function getStaticPaths() {

export async function getStaticProps(context) {
const guide = await getMdxNode("guide", context, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
mdxOptions: {
remarkPlugins: [
require("remark-slug"),
Expand Down
3 changes: 2 additions & 1 deletion www/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from "react"
import { GetStaticPropsResult } from "next"
import { getAllMdxNodes } from "next-mdx"
import Link from "next/link"
import { MdxRemote } from "next-mdx-remote/types"

import { site } from "config/site"
import { Feature } from "types"
Expand All @@ -16,7 +17,7 @@ interface FeatureCodeProps extends React.HTMLAttributes<HTMLDivElement> {

export function FeatureCode({ feature, ...props }: FeatureCodeProps) {
const content = useHydrate(feature, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
})

return <div {...props}>{content}</div>
Expand Down
5 changes: 3 additions & 2 deletions www/pages/learn/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getMdxNode, getMdxPaths, getAllMdxNodes } from "next-mdx/server"
import { useHydrate } from "next-mdx/client"
import classNames from "classnames"
import { getTableOfContents, TableOfContents } from "next-mdx-toc"
import { MdxRemote } from "next-mdx-remote/types"

import { Tutorial } from "types"
import { tutorialsConfig } from "config/tutorials"
Expand Down Expand Up @@ -31,7 +32,7 @@ export default function TutorialPage({
toc,
}: TutorialPageProps) {
const content = useHydrate(tutorial, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
})

const links = group.items.map((tutorial) => ({
Expand Down Expand Up @@ -141,7 +142,7 @@ export async function getStaticPaths() {

export async function getStaticProps(context) {
const tutorial = await getMdxNode("tutorial", context, {
components: mdxComponents,
components: mdxComponents as unknown as MdxRemote.Components,
mdxOptions: {
remarkPlugins: [
require("remark-slug"),
Expand Down
Loading