You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
1
# React & nextJs Gist Loader
2
2
3
-
- A library made using tsdx that help you to add gist in react and next on client side with username and avatar.
3
+
- A package help you to add github gist in react and next on client side with username and avatar.
4
+
5
+
## Demo
6
+
7
+
https://www.myselfraj.com/eg/gist
8
+
4
9
5
10
## Setup
6
11
@@ -11,6 +16,7 @@ npm i "@myselfraj/react-nextjs-github-gist"
11
16
## Usage
12
17
13
18
```
19
+
"use client"
14
20
import GitGist from "@myselfraj/react-nextjs-github-gist";
15
21
16
22
//Somewhere in component or page
@@ -22,19 +28,19 @@ You can get the id from the Github url, kindly check the URL sample https://gist
22
28
## Default Configuration
23
29
24
30
If no props are passed to ```<GitGist id="MUST" />```, below is the default configuration applied.
25
-
**id is must**
26
31
```
27
32
<GitGist
28
33
file = "",
29
34
width = '100%',
30
35
height = '600px',
31
-
getProfile = 'false', //this give avatar and name of the owner of gist
36
+
getProfile = 'false', //disables the feature that retrieves the avatar and name of the gist owner. Still you need to pass "UserName" manually, This Will depereacted in future releases to support UserName in advance Mode
32
37
userName = '' //pass the username of the gist owner
33
38
/>
34
39
```
35
40
36
-
currently because of CORS i am unable to fetch the userame from git, yet i will figure out some way in future releases, so for now lets do manual work.
37
-
Thnx to tleunen code.
41
+
Currently, due to CORS (Cross-Origin Resource Sharing) restrictions, I am unable to fetch the username from GitHub using the Gist API. However, I plan to find a solution for this in future releases. In the meantime, we will have to resort to manual work. That's why you need to pass the **userName** parameter manually.
42
+
43
+
38
44
39
45
40
46
---
@@ -45,10 +51,18 @@ Thnx to tleunen code.
45
51
3. Create pull request
46
52
4. We will review it and will merge it.
47
53
48
-
>>We are using Tsdx, to build you can use ```npm run build```
0 commit comments