Skip to content

Commit 2ad1771

Browse files
authored
Merge pull request recodehive#1602 from recodehive/blog/contributions
Blog/contributions
2 parents 879f6b2 + 47d1281 commit 2ad1771

10 files changed

Lines changed: 69 additions & 139 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
- uses: actions/setup-node@v4
1010
with:
1111
node-version: 20
12-
- run: npm ci || npm install
12+
- run: npm ci --legacy-peer-deps || npm install --legacy-peer-deps
1313
- run: npm run lint

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

docs/assets/blog-01-new-issue.png

-1.46 KB
Loading

docs/assets/blog-02-new-issue.png

104 KB
Loading

docs/assets/blog-03-new-issue.png

167 KB
Loading

docs/assets/blog-04-new-issue.png

127 KB
Loading

docs/getting_started.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,46 @@ This guide walks you through everything you need to write and publish a blog pos
1717
:::
1818
---
1919

20-
## Step 1: Raise a New issue
21-
22-
Head to the the GitHub issue on this [repository](https://github.com/recodehive/recode-website/issues)
23-
<BrowserWindow url="https://github.com/recodehive/recode-website/issues" bodyStyle={{padding: 0}}>
20+
## Step 1: Raise a New issue on GitHub
21+
22+
Head to the the GitHub issue on this [repository](https://github.com/recodehive/recode-website/issues), raise an new issue under documentation update.
23+
:::info
24+
* Few things to remember, don't raise random generic topics.
25+
* Write from real experience, try to include real dashboard pictures, no copy paste articles.
26+
* You can generate AI pictures, but need to be edited any tools like Canva.
27+
* Your article must teach something offical documentation doesnot. Means no Intro to X or What is X.
28+
* Start working on Issue When its assigned to you by @sanjay-kv or any Maintainer. ref step 4.
29+
<Tabs>
30+
<TabItem value="Step 1" label="Step 1">
31+
<BrowserWindow url="https://github.com/recodehive/recode-website/issues" bodyStyle={{padding: 0}}>
2432
[![Github](assets\blog-01-new-issue.png)](https://github.com/recodehive/recode-website/issues)
2533
</BrowserWindow>
34+
</TabItem>
2635

36+
<TabItem value="Step 2" label="Step 2">
37+
<BrowserWindow url="https://github.com/recodehive/recode-website/documentation" bodyStyle={{padding: 0}}>
38+
[![Github](assets\blog-02-new-issue.png)](https://github.com/recodehive/recode-website/documentations)
39+
</BrowserWindow>
2740

28-
## Step 1: Fork and Clone the Repository
29-
30-
1. Go to [https://github.com/recodehive/recode-website](https://github.com/recodehive/recode-website) and click **Fork** (top-right corner).
31-
32-
2. Clone your fork to your local machine:
33-
34-
```bash
35-
git clone https://github.com/your-username/recode-website.git
36-
cd recode-website
37-
```
38-
39-
3. Add the upstream remote so you can stay in sync:
40-
41-
```bash
42-
git remote add upstream https://github.com/recodehive/recode-website.git
43-
```
44-
45-
---
46-
47-
## Step 2: Install Dependencies and Run Locally
41+
</TabItem>
42+
43+
<TabItem value="Step 3" label="Step 3">
44+
<BrowserWindow url="https://github.com/recodehive/recode-website/issues/1586" bodyStyle={{padding: 0}}>
45+
[![Github](assets\blog-03-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
46+
</BrowserWindow>
47+
</TabItem>
4848

49-
```bash
50-
npm install
51-
npm start
52-
```
49+
<TabItem value="Step 4" label="Step 4">
50+
<BrowserWindow url="https://github.com/recodehive/recode-website/issues/1577" bodyStyle={{padding: 0}}>
51+
[![Github](assets\blog-04-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
52+
</BrowserWindow>
53+
</TabItem>
54+
55+
</Tabs>
5356

54-
This starts a local development server. Open [http://localhost:3000](http://localhost:3000) in your browser to preview the site live. Changes you make to files will hot-reload automatically.
57+
:::
5558

59+
#### Just follow the steps on forking the repositories and installing the dependencies on your local repository, if you dont know refer the steps 2 to 6 on [welcome page](https://www.recodehive.com/docs/).
5660
---
5761

5862
## Step 3: Create a New Branch

package-lock.json

Lines changed: 13 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"@radix-ui/react-avatar": "^1.1.7",
4646
"@radix-ui/react-collapsible": "^1.1.12",
4747
"@radix-ui/react-slot": "^1.2.3",
48-
"@tsparticles/react": "^3.0.0",
48+
"@tsparticles/engine": "^4.0.5",
49+
"@tsparticles/react": "^4.0.5",
4950
"@tsparticles/slim": "^4.0.5",
5051
"@vercel/analytics": "^1.5.0",
5152
"canvas-confetti": "^1.9.3",

src/components/particle.tsx

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import * as React from "react";
2-
import Particles, { initParticlesEngine } from "@tsparticles/react";
3-
import { useEffect, useMemo, useState } from "react";
2+
import Particles, { ParticlesProvider } from "@tsparticles/react";
3+
import { useCallback, useMemo } from "react";
44
import { loadSlim } from "@tsparticles/slim";
55

66
const ParticlesComponent = (props) => {
7-
const [init, setInit] = useState(false);
8-
9-
useEffect(() => {
10-
initParticlesEngine(async (engine) => {
11-
await loadSlim(engine);
12-
}).then(() => {
13-
setInit(true);
14-
});
7+
const particlesInit = useCallback(async (engine) => {
8+
await loadSlim(engine);
159
}, []);
1610

1711
const particlesLoaded = (container) => {
@@ -96,19 +90,21 @@ const ParticlesComponent = (props) => {
9690
);
9791

9892
return (
99-
<div
100-
style={{
101-
position: "fixed",
102-
width: "100vw",
103-
height: "100vh",
104-
top: 0,
105-
left: 0,
106-
zIndex: -1, // Critical: ensures it's in the background
107-
pointerEvents: "none", // Ensures it doesn't block clicks
108-
}}
109-
>
110-
<Particles id={props.id} options={options} />
111-
</div>
93+
<ParticlesProvider init={particlesInit}>
94+
<div
95+
style={{
96+
position: "fixed",
97+
width: "100vw",
98+
height: "100vh",
99+
top: 0,
100+
left: 0,
101+
zIndex: -1, // Critical: ensures it's in the background
102+
pointerEvents: "none", // Ensures it doesn't block clicks
103+
}}
104+
>
105+
<Particles id={props.id} options={options} particlesLoaded={particlesLoaded} />
106+
</div>
107+
</ParticlesProvider>
112108
);
113109
};
114110

0 commit comments

Comments
 (0)