Skip to content

Commit 2b8139e

Browse files
committed
chore: update docs
1 parent c2f5e44 commit 2b8139e

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

CONTRIBUTING.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Contributing Guide
2+
3+
Thanks for lending a hand 👋
4+
5+
## Development
6+
7+
### Setup
8+
9+
- We use [pnpm](https://pnpm.js.org/) to manage dependencies. Install it with `npm i -g pnpm`.
10+
11+
Install dependencies
12+
13+
```bash
14+
pnpm install
15+
```
16+
17+
Start the Demo server
18+
19+
```bash
20+
npm run build:lib:dev
21+
npm run playground
22+
```
23+
24+
### Packages Structure
25+
26+
- `src/components`: Contains all the components.
27+
- `src/hooks`: Contains all the hooks.
28+
- `src/utils`: Contains all the utility functions.
29+
- `src/styles`: Contains all the global styles.
30+
- `src/index.ts`: Exports all the components, hooks, and utility functions.
31+
- `src/extensions`: Contains all the extensions.
32+
33+
### Coding conventions
34+
35+
- We use ESLint to lint and format the codebase. Before you commit, all files will be formatted automatically.
36+
- We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). Please use a prefix. If your PR has multiple commits and some of them don't follow the Conventional Commits rule, we'll do a squash merge.

docs/.vitepress/locale.ts

+11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import type { DefaultTheme, HeadConfig, LocaleConfig } from 'vitepress'
2+
import { version } from '../../package.json'
23
import { createTranslate } from './i18n/utils'
34

45
const docsLink = 'https://reactjs-tiptap-editor.vercel.app'
56
const githubRepo = 'hunghg255/reactjs-tiptap-editor'
67
const githubLink: 'https://github.com/hunghg255/reactjs-tiptap-editor' = `https://github.com/${githubRepo}`
78

9+
const VERSIONS: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [
10+
{ text: `v${version} (current)`, link: '/' },
11+
{ text: `Release Notes`, link: 'https://github.com/hunghg255/reactjs-tiptap-editor/releases' },
12+
{ text: `Contributing`, link: 'https://github.com/hunghg255/reactjs-tiptap-editor/blob/main/CONTRIBUTING.md' },
13+
]
14+
815
export function getLocaleConfig(lang: string) {
916
const t = createTranslate(lang)
1017

@@ -274,6 +281,10 @@ export function getLocaleConfig(lang: string) {
274281
},
275282
],
276283
},
284+
{
285+
text: `v${version}`,
286+
items: VERSIONS,
287+
},
277288
]
278289

279290
const themeConfig: DefaultTheme.Config = {

0 commit comments

Comments
 (0)