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

chore: update documentation to tuono 0.17.x #364

Merged
merged 9 commits into from
Jan 20, 2025
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
3 changes: 1 addition & 2 deletions apps/documentation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ name = "tuono"
path = ".tuono/main.rs"

[dependencies]
tuono_lib = "0.16.9"
tuono_lib = "0.17.3"
glob = "0.3.1"
time = { version = "0.3", features = ["macros"] }
serde = { version = "1.0.202", features = ["derive"] }

20 changes: 10 additions & 10 deletions apps/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
"types": "tsc --noEmit"
},
"dependencies": {
"@mantine/code-highlight": "7.14.2",
"@mantine/core": "7.14.2",
"@mantine/hooks": "7.14.2",
"@mantine/code-highlight": "7.16.0",
"@mantine/core": "7.16.0",
"@mantine/hooks": "7.16.0",
"@mdx-js/react": "3.1.0",
"@tabler/icons-react": "3.22.0",
"@tabler/icons-react": "3.28.1",
"clsx": "2.1.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"remark-gfm": "4.0.0",
"tuono": "npm:tuono@0.16.9"
"tuono": "npm:tuono@0.17.3"
},
"devDependencies": {
"@mdx-js/rollup": "3.1.0",
"@types/react": "18.3.18",
"@types/react-dom": "18.3.5",
"postcss": "8.5.0",
"@types/react": "19.0.6",
"@types/react-dom": "19.0.3",
"postcss": "8.5.1",
"postcss-preset-mantine": "1.17.0",
"postcss-simple-vars": "7.0.1"
}
Expand Down
10 changes: 4 additions & 6 deletions apps/documentation/src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo, type JSX } from 'react'
import { Breadcrumbs as MantineBreadcrumbs, Button } from '@mantine/core'
import { Link, Head } from 'tuono'
import { Link } from 'tuono'

import { IconChevronRight, IconBolt } from '@tabler/icons-react'

Expand Down Expand Up @@ -43,11 +43,9 @@ export default function Breadcrumbs({

return (
<>
<Head>
<script type="application/ld+json">
{JSON.stringify(ldJson, null, 2)}
</script>
</Head>
<script type="application/ld+json">
{JSON.stringify(ldJson, null, 2)}
</script>
jacobhq marked this conversation as resolved.
Show resolved Hide resolved
<MantineBreadcrumbs
separator={<IconChevronRight size="1.1rem" stroke={1.5} />}
mb="md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default function MdxProvider({
<MDXProvider
components={{
a: MdxLink,
// @ts-expect-error: useless finding the correct props types
pre: MdxPre,
blockquote: MdxQuote,
code: MdxCode,
Expand Down
5 changes: 2 additions & 3 deletions apps/documentation/src/components/MetaTags/MetaTags.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { ReactNode } from 'react'
import { Head } from 'tuono'

interface MetaTagsProps {
title: string
Expand All @@ -15,7 +14,7 @@ export default function MetaTags({
canonical,
}: MetaTagsProps): ReactNode {
return (
<Head>
<>
<title>{title}</title>
<link rel="canonical" href={canonical} />
<meta
Expand All @@ -41,6 +40,6 @@ export default function MetaTags({
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content="https://tuono.dev/og-cover.png" />
</Head>
</>
)
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import type { ReactNode, JSX } from 'react'
import { TuonoScripts } from 'tuono'

import {
ColorSchemeScript,
createTheme,
MantineProvider,
AppShell,
Container,
mantineHtmlProps,
type CSSVariablesResolver,
} from '@mantine/core'
import type { CSSVariablesResolver } from '@mantine/core'
import { useDisclosure } from '@mantine/hooks'
import { Head } from 'tuono'

import EditPage from '@/components/EditPage'
import MdxProvider from '@/components/MdxProvider'
Expand Down Expand Up @@ -87,8 +88,8 @@ export default function RootRoute({ children }: RootRouteProps): JSX.Element {
const [opened, { toggle }] = useDisclosure()

return (
<>
<Head>
<html lang="en" {...mantineHtmlProps}>
<head>
<meta charSet="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
Expand All @@ -109,28 +110,31 @@ export default function RootRoute({ children }: RootRouteProps): JSX.Element {
href="/favicon-16x16.png"
/>
<link rel="manifest" href="/site.webmanifest" />
</Head>
<ColorSchemeScript />
<MantineProvider theme={theme} cssVariablesResolver={resolver}>
<AppShell
layout="alt"
header={{ height: 60 }}
navbar={{
width: 300,
breakpoint: 'sm',
collapsed: { mobile: !opened },
}}
>
<Navbar toggle={toggle} />
<Sidebar close={toggle} />
<AppShell.Main>
<Container id="mdx-root" component="article" size="md" p={20}>
<MdxProvider>{children}</MdxProvider>
<EditPage />
</Container>
</AppShell.Main>
</AppShell>
</MantineProvider>
</>
<ColorSchemeScript />
</head>
<body>
<MantineProvider theme={theme} cssVariablesResolver={resolver}>
<AppShell
layout="alt"
header={{ height: 60 }}
navbar={{
width: 300,
breakpoint: 'sm',
collapsed: { mobile: !opened },
}}
>
<Navbar toggle={toggle} />
<Sidebar close={toggle} />
<AppShell.Main>
<Container id="mdx-root" component="article" size="md" p={20}>
<MdxProvider>{children}</MdxProvider>
<EditPage />
</Container>
</AppShell.Main>
</AppShell>
</MantineProvider>
<TuonoScripts />
</body>
</html>
)
}
Loading
Loading