diff --git a/.eslintignore b/.eslintignore index a547bf36d..8bf8d196f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,3 @@ -# Logs logs *.log npm-debug.log* @@ -12,7 +11,6 @@ dist dist-ssr *.local -# Editor directories and files .vscode/* !.vscode/extensions.json .idea diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 000000000..21181178d --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,19 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true, node: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + 'plugin:prettier/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +}; diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 7fb670852..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,29 +0,0 @@ -// .eslintrc.js -module.exports = { - env: { - browser: true, - es2021: true, - node: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:prettier/recommended', - ], - settings: { - react: { - version: 'detect', - }, - }, - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - ecmaVersion: 'latest', - sourceType: 'module', - }, - plugins: ['react'], - rules: { - 'react/react-in-jsx-scope': 'off', - }, -}; diff --git a/.npmignore b/.npmignore deleted file mode 100644 index b1261e51a..000000000 --- a/.npmignore +++ /dev/null @@ -1,14 +0,0 @@ -public -src -.eslintignore -.eslintrc.js -.prettierignore -.prettierrc -CODE_OF_CONDUCT.md -CONTRIBUTING.md -gitprofile.config.js -index.html -library.config.js -tailwind.config.mjs -vite.config.js -stats.html diff --git a/.prettierignore b/.prettierignore index a547bf36d..8bf8d196f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,3 @@ -# Logs logs *.log npm-debug.log* @@ -12,7 +11,6 @@ dist dist-ssr *.local -# Editor directories and files .vscode/* !.vscode/extensions.json .idea diff --git a/README.md b/README.md index 2a201e3e7..60af29aef 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,6 @@ - - - @@ -49,18 +46,18 @@
-
+
-
+
- -
- -## 🎉 Thank you for the 800 ★ - -- - - +
## 🛠 Installation & Setup @@ -96,7 +83,6 @@ There are three ways to use **GitProfile**. Use any. - [Forking this repo _(recommended)_](#forking-this-repo) - [Setting up locally](#setting-up-locally) -- [Installing as package](#installing-as-package) ### Forking this repo @@ -108,16 +94,16 @@ These instructions will get you a copy of the project and deploy your portfolio - If you want to host your portfolio at `https://- +
You can create your own custom theme by modifying these values. Theme `procyon` will have the custom styles. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... themeConfig: { customTheme: { @@ -415,9 +416,9 @@ const config = { **GitProfile** supports both GA3 and GA4. If you do not want to use Google Analytics, keep the `id` empty. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... googleAnalytics: { id: '', @@ -431,9 +432,9 @@ Besides tracking visitors, it will track `click events` on projects and blog pos **GitProfile** supports [hotjar](https://www.hotjar.com) to track visitor interaction and behavior. If you do not want to use Hotjar, keep the `id` empty. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... hotjar: { id: '', @@ -444,11 +445,23 @@ const config = { ### SEO -Meta tags will be auto-generated from configs dynamically. However, you can also manually add meta tags in `public/index.html`. +You can customize the meta tags for SEO in `seo`. + +```ts +// gitprofile.config.ts +const CONFIG = { + // ... + seo: { + title: 'Portfolio of Ariful Alam', + description: '', + imageURL: '', + }, +}; +``` ### PWA -GitProfile is PWA enabled. The site can be installed as a Progressive Web App. +GitProfile is PWA enabled. The site can be installed as a Progressive Web App. To turn it off, set `enablePWA` to `false`. ![PWA](https://github.com/arifszn/gitprofile/assets/45073703/9dc7cc5c-4262-4445-a7a5-1e3566ef43fa) @@ -460,9 +473,9 @@ Your avatar and bio will be fetched from GitHub automatically. You can link your social media services you're using, including LinkedIn, Twitter, Mastodon, Facebook, Instagram, YouTube, Dribbble, Behance, Medium, dev, Stack Overflow, Skype, Telegram, personal website, phone and email. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... social: { linkedin: 'ariful-alam', @@ -489,9 +502,9 @@ const config = { To showcase your skills provide them here. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... skills: ['JavaScript', 'React.js'], }; @@ -503,9 +516,9 @@ Empty array will hide the skills section. Provide your job history in `experiences`. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... experiences: [ { @@ -530,13 +543,13 @@ Empty array will hide the experience section. ### Education -Provide your education history in `education`. +Provide your education history in `educations`. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... - education: [ + educations: [ { institution: 'Institution name 1', degree: 'Bachelor of Science', @@ -559,9 +572,9 @@ Empty array will hide the education section. Provide your industry certifications in `certifications`. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... certifications: [ { @@ -580,19 +593,30 @@ Empty array will hide the certifications section. #### Github Projects -Your public repo from GitHub will be displayed in the `Github Projects` section automatically. You can limit how many projects do you want to be displayed. Also, you can hide forked or specific repo. +- **Automatic Mode:** Seamlessly showcase your top GitHub projects based on stars or last updated date. +- **Manual Mode:** Choose specific repositories to highlight. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... - github: { - username: 'arifszn', - sortBy: 'stars', - limit: 8, - exclude: { - forks: false, - projects: ['my-project1', 'my-project2'], + projects: { + github: { + display: true, // Display GitHub projects? + header: 'Github Projects', + mode: 'automatic', // Mode can be: 'automatic' or 'manual' + automatic: { + sortBy: 'stars', // Sort projects by 'stars' or 'updated' + limit: 8, // How many projects to display. + exclude: { + forks: false, // Forked projects will not be displayed if set to true. + projects: [], // These projects will not be displayed. example: ['arifszn/my-project1', 'arifszn/my-project2'] + }, + }, + manual: { + // Properties for manually specifying projects + projects: ['arifszn/gitprofile', 'arifszn/pandora'], // List of repository names to display. example: ['arifszn/my-project1', 'arifszn/my-project2'] + }, }, }, }; @@ -600,20 +624,37 @@ const config = { #### External Projects -In this section you can showcase your external/personal projects. +- **Highlight Projects Beyond GitHub:** Feature projects hosted on other platforms or personal websites. +- **Control over Content:** Provide custom titles, descriptions, images, and links for each external project. -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... - externalProjects: [ - { - title: 'Project Name', - description: 'Description', - link: 'https://example.com', - imageUrl: 'https://via.placeholder.com/250x250', + projects: { + external: { + header: 'My Projects', + // To hide the `External Projects` section, keep it empty. + projects: [ + { + title: 'Project Name', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut.', + imageUrl: + 'https://img.freepik.com/free-vector/illustration-gallery-icon_53876-27002.jpg', + link: 'https://example.com', + }, + { + title: 'Project Name', + description: + 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut.', + imageUrl: + 'https://img.freepik.com/free-vector/illustration-gallery-icon_53876-27002.jpg', + link: 'https://example.com', + }, + ], }, - ], + }, }; ``` @@ -621,9 +662,9 @@ const config = { If you have [medium](https://medium.com) or [dev](https://dev.to) account, you can show your recent blog posts in here just by providing your medium/dev username. You can limit how many posts to display (Max is `10`). -```js -// gitprofile.config.js -const config = { +```ts +// gitprofile.config.ts +const CONFIG = { // ... blog: { source: 'dev', @@ -633,7 +674,7 @@ const config = { }; ``` -![Blog](https://arifszn.netlify.app/assets/img/hosted/gitprofile/blog.png) +![Blog](https://github.com/arifszn/gitprofile/assets/45073703/410124f2-a3c2-48f1-8ec8-0c6fae74ae3d) The posts are fetched by [blog.js](https://github.com/arifszn/blog.js). diff --git a/gitprofile.config.js b/gitprofile.config.ts similarity index 55% rename from gitprofile.config.js rename to gitprofile.config.ts index acb9790dc..bed1e2c17 100644 --- a/gitprofile.config.js +++ b/gitprofile.config.ts @@ -1,15 +1,61 @@ -// gitprofile.config.js +// gitprofile.config.ts -const config = { +const CONFIG = { github: { - username: 'arifszn', // Your GitHub org/user name. (Required) - sortBy: 'stars', // stars | updated - limit: 10, // How many projects to display. - exclude: { - forks: false, // Forked projects will not be displayed if set to true. - projects: [], // These projects will not be displayed. example: ['my-project1', 'my-project2'] + username: 'arifszn', // Your GitHub org/user name. (This is the only required config) + }, + /** + * If you are deploying to https://{props.title}
+ Please provide correct config in gitprofile.config.ts
.
+
+ Oh no, you hit the{' '} + + rate limit + + ! Try again later{` ${resetTime}`}. +
+ ), + }; +}; + +export const INVALID_GITHUB_USERNAME_ERROR: CustomError = { + status: 404, + title: 'Invalid GitHub Username!', + subTitle: ( +
+ Please provide correct github username in{' '}
+ gitprofile.config.ts
.
+
- Oh no, you hit the{' '} - - rate limit - - ! Try again later{` ${reset}`}. -
- ), - }; -}; - -export const notFoundError = { - status: 404, - title: 'The Github Username is Incorrect.', - subTitle: ( -
- Please provide correct github username in{' '}
- gitprofile.config.js
.
-