|
48 | 48 |
|
49 | 49 | ### Code changes |
50 | 50 |
|
51 | | -Three main things have to be changed to customize it your way (please open an issue if you find more such instances): |
52 | 51 |
|
53 | | -1. Personal Information |
| 52 | +#### 1. Import all your data from LinkedIn (Beta) 🔄 |
54 | 53 |
|
55 | | -- [/src/constants/index.js](https://github.com/mittal-parth/personal-portfolio/blob/main/src/constants/index.js) contains all the personal information one needs to change. Each website section is written as a JavaScript object and is pretty intuitive to change. |
| 54 | +This feature allows you to import your LinkedIn data to quickly populate your portfolio. Here's how to use it: |
| 55 | + |
| 56 | +1. **Export Your LinkedIn Data**: |
| 57 | + - Follow LinkedIn's guide to [download your account data](https://www.linkedin.com/help/linkedin/answer/a1339364/downloading-your-account-data) |
| 58 | + - The export process may take up to 48 hours |
| 59 | + - Once ready, download and extract the ZIP file |
| 60 | + |
| 61 | +2. **Prepare the Data**: |
| 62 | + - Move the extracted directory inside the `snippets` folder |
| 63 | + - Rename the directory to `linkedin-export` |
| 64 | + |
| 65 | +3. **Run the Import Script**: |
| 66 | + ```bash |
| 67 | + python3 snippets/bulk_import_from_linkedin.py |
| 68 | + ``` |
| 69 | + This will: |
| 70 | + - Read your LinkedIn data |
| 71 | + - Convert it to the portfolio format |
| 72 | + - Create/update `src/constants/index-example.js` |
| 73 | + |
| 74 | +4. **Finalize the Import**: |
| 75 | + - Review the generated `index-example.js` file |
| 76 | + - Replace `src/constants/index.js` with the contents of `index-example.js` |
| 77 | + - Customize the imported data as needed |
| 78 | + |
| 79 | +**Important Notes**: |
| 80 | +- This is a beta feature and may require manual adjustments |
| 81 | +- You'll need to manually add: |
| 82 | + - Icons for skills and frameworks |
| 83 | + - Project images |
| 84 | + - Company logos |
| 85 | + - Any additional customizations following instructions in **[Enter your data manually](#2-enter-your-data-manually)** |
| 86 | +- Some fields may need manual adjustment to match your preferred presentation style |
| 87 | + |
| 88 | +#### 2. Enter your data manually |
| 89 | + |
| 90 | +The LinkedIn import is optional and will still require adding images and icons. Those can be done by following the instructions below. |
| 91 | + |
| 92 | +1. **Personal Information** |
| 93 | + |
| 94 | +- _If you're using the LinkedIn import, most of the data is already there._ [/src/constants/index.js](https://github.com/mittal-parth/personal-portfolio/blob/main/src/constants/index.js) contains all the personal information one needs to change. Each website section is written as a JavaScript object and is pretty intuitive to change. |
56 | 95 |
|
57 | 96 | - Icons |
58 | | - - Whenever you want to use an icon, you'll have to make sure that the icon is imported. |
59 | | - - Head to [https://react-icons.github.io/react-icons/search](https://react-icons.github.io/react-icons/search) and search for the desired icon. (Eg: SiReact for ReactJS) |
60 | | - - Note the package it belongs to (Eg: 'Si' here) |
61 | | - - Import the icon into [`/src/constants/index.js`](https://github.com/mittal-parth/personal-portfolio/blob/main/src/constants/index.js) (Eg: `import { ... SiReact, } from "react-icons/si";` here) |
| 97 | + - Whenever you want to use an icon, you'll have to make sure that the icon is imported. |
| 98 | + - Head to [https://react-icons.github.io/react-icons/search](https://react-icons.github.io/react-icons/search) and search for the desired icon. (Eg: SiReact for ReactJS) |
| 99 | + - Note the package it belongs to (Eg: 'Si' here) |
| 100 | + - Import the icon into [`/src/constants/index.js`](https://github.com/mittal-parth/personal-portfolio/blob/main/src/constants/index.js) (Eg: `import { ... SiReact, } from "react-icons/si";` here) |
62 | 101 |
|
63 | | -2. Website title and icon |
| 102 | +2. **Website title and icon** |
64 | 103 |
|
65 | | -- Go to [`index.html`](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html) and change the [`title`](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html#L7") to your name. |
66 | | -- Also, change the link to the title [icon](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html#L5) |
| 104 | + - Go to [`index.html`](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html) and change the [`title`](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html#L7") to your name. |
| 105 | + - Also, change the link to the title [icon](https://github.com/mittal-parth/personal-portfolio/blob/main/index.html#L5) |
67 | 106 |
|
68 | | -3. Assets |
| 107 | +3. **Assets** |
69 | 108 |
|
70 | | -- Add any assets (images) to the [`assets`](https://github.com/mittal-parth/personal-portfolio/tree/main/src/assets) folder. |
71 | | -- Import the asset and export it using the[`/src/assets/index.js`](https://github.com/mittal-parth/personal-portfolio/blob/main/src/assets/index.js) file. |
| 109 | + - Add any assets (images) to the [`assets`](https://github.com/mittal-parth/personal-portfolio/tree/main/src/assets) folder. |
| 110 | + - Import the asset and export it using the[`/src/assets/index.js`](https://github.com/mittal-parth/personal-portfolio/blob/main/src/assets/index.js) file. |
72 | 111 |
|
73 | | -4. Creating a .env file |
| 112 | +4. **Creating a .env file** |
74 | 113 |
|
75 | | - > Environment variables store sensitive information that vary for the user and should not be checked into source control. |
76 | | - > One such example is the GitHub personal access token to automatically fetch the Open Source Contributions. |
| 114 | + > Environment variables store sensitive information that vary for the user and should not be checked into source control. |
| 115 | + > One such example is the GitHub personal access token to automatically fetch the Open Source Contributions. |
77 | 116 |
|
78 | | -- A personal access token (classic) can be created to use the GitHub API following the official guide from GitHub - [GitHub Docs - Creating personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). Giving it repo:status, public_repo, read:project, read:org scopes is sufficient. |
79 | | -- Create a file called `.env` in the root project folder |
80 | | -- Copy over the contents of the `.env.example` example file into the `.env` file. |
81 | | -- Replace the value of the environment variable value(s) with the values you want the environment variables to hold, for e.g. `VITE_GH_TOKEN=YOUR_GITHUB_TOKEN` where `YOUR_GITHUB_TOKEN` is the personal access token you generated earlier. |
| 117 | + - A personal access token (classic) can be created to use the GitHub API following the official guide from GitHub - [GitHub Docs - Creating personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). Giving it repo:status, public_repo, read:project, read:org scopes is sufficient. |
| 118 | + - Create a file called `.env` in the root project folder |
| 119 | + - Copy over the contents of the `.env.example` example file into the `.env` file. |
| 120 | + - Replace the value of the environment variable value(s) with the values you want the environment variables to hold, for e.g. `VITE_GH_TOKEN=YOUR_GITHUB_TOKEN` where `YOUR_GITHUB_TOKEN` is the personal access token you generated earlier. |
82 | 121 |
|
83 | 122 |
|
84 | 123 |
|
@@ -119,6 +158,16 @@ our community aspires to be a respectful place both during online and in-person |
119 | 158 |
|
120 | 159 | - `npx netlify dev` |
121 | 160 |
|
| 161 | +### Testing the LinkedIn Import |
| 162 | + |
| 163 | +If you're making changes to the LinkedIn import functionality, you can run the test suite to ensure everything works as expected: |
| 164 | + |
| 165 | + **Run all test cases**: |
| 166 | + ```bash |
| 167 | + python3 -m unittest snippets/test_bulk_import.py |
| 168 | + ``` |
| 169 | + |
| 170 | + |
122 | 171 | <br/> |
123 | 172 |
|
124 | 173 | ## Sample Git Workflow |
|
0 commit comments