diff --git a/apps/documentation/src/components/mdx-provider/mdx-h2/mdx-h2.tsx b/apps/documentation/src/components/mdx-provider/mdx-h2/mdx-h2.tsx index a48e54b1..0c30846e 100644 --- a/apps/documentation/src/components/mdx-provider/mdx-h2/mdx-h2.tsx +++ b/apps/documentation/src/components/mdx-provider/mdx-h2/mdx-h2.tsx @@ -1,8 +1,17 @@ import { Title } from '@mantine/core' -import type { HTMLAttributes } from 'react' +import { useRef, type HTMLAttributes } from 'react' export default function MdxH2( props: HTMLAttributes, ): JSX.Element { - return + return ( + <Title + {...props} + mt={20} + order={2} + id={String(props.children ?? '') + .toLowerCase() + .replaceAll(' ', '-')} + /> + ) } diff --git a/apps/documentation/src/components/mdx-provider/mdx-title/mdx-title.tsx b/apps/documentation/src/components/mdx-provider/mdx-title/mdx-title.tsx index d562ed9d..0326e553 100644 --- a/apps/documentation/src/components/mdx-provider/mdx-title/mdx-title.tsx +++ b/apps/documentation/src/components/mdx-provider/mdx-title/mdx-title.tsx @@ -4,5 +4,13 @@ import type { HTMLAttributes } from 'react' export default function MdxTitle( props: HTMLAttributes<HTMLHeadingElement>, ): JSX.Element { - return <Title {...props} order={1} /> + return ( + <Title + {...props} + order={1} + id={String(props.children ?? '') + .toLowerCase() + .replaceAll(' ', '-')} + /> + ) } diff --git a/apps/documentation/src/routes/documentation/contributing.mdx b/apps/documentation/src/routes/documentation/contributing.mdx index c286a060..5daaa1bf 100644 --- a/apps/documentation/src/routes/documentation/contributing.mdx +++ b/apps/documentation/src/routes/documentation/contributing.mdx @@ -26,7 +26,7 @@ The `tuono` project can mostly be split by the following sub-domains: - The documentation website (which is written with tuono 🚀) To check what are the knowledge requirement for each domain check the -[requirements](/documentation/contributing?#requirements) section below. +[requirements](#requirements) section below. Currently I'm keeping a private dashboard to prioritize new features and bug fixes but if you want to propose something please open a new issue on github or reach me using diff --git a/apps/documentation/tsconfig.json b/apps/documentation/tsconfig.json index a7fc6fbf..a938959d 100644 --- a/apps/documentation/tsconfig.json +++ b/apps/documentation/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ES2021", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true,