Skip to content

Commit cc385ca

Browse files
committed
chore: update docs config
1 parent 44c641b commit cc385ca

8 files changed

+72
-90
lines changed

docs/bun.lockb

561 Bytes
Binary file not shown.

docs/components/Property.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { jsonToLuaPretty } from './utils/json-to-lua'
2-
// @ts-expect-error: FIXME
3-
import { Property as GrappProperty } from '@grapp/nextra-theme'
1+
import * as React from 'react';
42

5-
type Props = React.ComponentProps<typeof GrappProperty>
3+
import { Property as GrappProperty } from '@grapp/nextra-theme';
4+
5+
import { jsonToLuaPretty } from './utils/json-to-lua';
6+
7+
type Props = React.ComponentProps<typeof GrappProperty>;
68

79
export const Property = (props: Props) => {
8-
return <GrappProperty {...props} parse={jsonToLuaPretty} />
9-
}
10+
return <GrappProperty {...props} parse={jsonToLuaPretty} />;
11+
};

docs/next.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const nextra = require('nextra')
2-
const { getNextraOptions, getWithNextraOptions } = require('@grapp/nextra-theme/config/nextra')
1+
const nextra = require('nextra');
2+
const { getNextraOptions, getWithNextraOptions } = require('@grapp/nextra-theme/config/nextra');
33

4-
const withNextra = nextra(getNextraOptions())
5-
module.exports = withNextra(getWithNextraOptions())
4+
const withNextra = nextra(getNextraOptions());
5+
module.exports = withNextra(getWithNextraOptions());

docs/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
"@types/react-dom": "^18.2.21",
1717
"bun-types": "latest",
1818
"eslint": "^8.57.0",
19-
"prettier": "^3.2.5"
20-
},
21-
"peerDependencies": {
19+
"prettier": "^3.2.5",
2220
"typescript": "^5.0.0"
2321
},
2422
"dependencies": {
25-
"@grapp/nextra-theme": "^0.2.4"
23+
"@grapp/nextra-theme": "^0.3.2"
2624
}
2725
}

docs/pages/index.mdx

+2-11
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import { Homepage, Hero, Features, Feature } from '@grapp/nextra-theme';
44
preview="/gifs/hero.gif"
55
hero={
66
<Hero
7-
headline={
8-
<>
9-
A set of tools for creating <br className="sm:hidden" />
10-
<br className="hidden sm:block" />
11-
user interfaces in Neovim
12-
</>
13-
}
7+
headline=" A set of tools for creating user interfaces in Neovim"
148
subtitle={
159
<>
1610
NuiComponents is a library built on top of{' '}
@@ -21,10 +15,7 @@ import { Homepage, Hero, Features, Feature } from '@grapp/nextra-theme';
2115
className="nx-text-primary-600 nx-underline nx-decoration-from-font [text-underline-position:from-font]"
2216
>
2317
nui.nvim
24-
</a>
25-
,
26-
<br />
27-
it aims to make UI development in Neovim more accessible, intuitive, and enjoyable.
18+
</a>, it aims to make UI development in Neovim more accessible, intuitive, and enjoyable.
2819
</>
2920
}
3021
/>

docs/styles.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
@import "@grapp/nextra-theme/styles/main.css";
1+
@import "@grapp/nextra-theme/lib/global.css";
2+
@import "@grapp/nextra-theme/lib/index.css";

docs/theme.config.jsx

+51-46
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { getDefaultConfig } from '@grapp/nextra-theme/config/next'
2-
import { Logo, Footer } from '@grapp/nextra-theme'
3-
import NuiComponentsLogo from './components/svg/nui-components-logo.svg'
1+
import NuiComponentsLogo from './components/svg/nui-components-logo.svg';
2+
3+
import { Footer, Logo } from '@grapp/nextra-theme';
4+
import { getDefaultConfig } from '@grapp/nextra-theme/config/next';
45

56
export default getDefaultConfig({
67
title: 'NuiComponents',
@@ -9,46 +10,50 @@ export default getDefaultConfig({
910
github: 'https://github.com/grapp-dev/nui-components.nvim',
1011
discord: 'https://discord.gg/Rj2V3keVS4',
1112
docs: 'https://nui-components.grapp.dev',
12-
logo: () => <Logo image={NuiComponentsLogo} title="Nui.Components" />,
13-
footer: () => (
14-
<Footer
15-
github="https://github.com/grapp-dev/nui-components.nvim"
16-
sections={[
17-
{
18-
title: 'FAQ',
19-
links: [
20-
{
21-
title: 'What is NuiComponents?',
22-
url: '/docs#what-is-nuicomponents',
23-
},
24-
{
25-
title: 'Key Features',
26-
url: '/docs#key-features',
27-
},
28-
{
29-
title: 'About Grapp.Dev',
30-
url: '/about',
31-
},
32-
],
33-
},
34-
{
35-
title: 'Guides',
36-
links: [
37-
{
38-
title: 'Your first UI implementation',
39-
url: '/docs/getting-started#your-first-ui-implementation',
40-
},
41-
{
42-
title: 'Discover Signal API',
43-
url: '/docs/signal#usage-example',
44-
},
45-
{
46-
title: 'Create a new component',
47-
url: '/docs/component#create-a-new-component',
48-
},
49-
],
50-
},
51-
]}
52-
/>
53-
),
54-
})
13+
logo: () => {
14+
return <Logo image={NuiComponentsLogo} title="Nui.Components" />;
15+
},
16+
footer: () => {
17+
return (
18+
<Footer
19+
github="https://github.com/grapp-dev/nui-components.nvim"
20+
sections={[
21+
{
22+
title: 'FAQ',
23+
links: [
24+
{
25+
title: 'What is NuiComponents?',
26+
url: '/docs#what-is-nuicomponents',
27+
},
28+
{
29+
title: 'Key Features',
30+
url: '/docs#key-features',
31+
},
32+
{
33+
title: 'About Grapp.Dev',
34+
url: '/about',
35+
},
36+
],
37+
},
38+
{
39+
title: 'Guides',
40+
links: [
41+
{
42+
title: 'Your first UI implementation',
43+
url: '/docs/getting-started#your-first-ui-implementation',
44+
},
45+
{
46+
title: 'Discover Signal API',
47+
url: '/docs/signal#usage-example',
48+
},
49+
{
50+
title: 'Create a new component',
51+
url: '/docs/component#create-a-new-component',
52+
},
53+
],
54+
},
55+
]}
56+
/>
57+
);
58+
},
59+
});

docs/tsconfig.json

+3-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
{
2-
"extends": "@grapp/ts-config/default.json",
3-
"compilerOptions": {
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
9-
"allowJs": true,
10-
"noEmit": true,
11-
"incremental": true,
12-
"resolveJsonModule": true,
13-
"jsx": "preserve"
14-
},
2+
"extends": "@grapp/nextra-theme/default.json",
153
"include": [
164
"next-env.d.ts",
17-
"**/*.ts",
18-
"**/*.tsx"
19-
],
20-
"exclude": [
21-
"node_modules"
5+
"./docs/**/*.ts",
6+
"./docs/**/*.tsx"
227
]
238
}

0 commit comments

Comments
 (0)