Compare commits

...

21 Commits

Author SHA1 Message Date
Rahul Jain c756ec8587 add: star history section to README
Added star history section with responsive images.
2025-10-28 15:56:26 +05:30
Rahul Jain 26db3b7d8c Merge pull request #937 from rahuldkjain/dev
chore: add github-sponsor
2025-10-17 17:00:06 +05:30
Rahul Jain 61203fd35a chore: add github-sponsor 2025-10-17 16:59:35 +05:30
Rahul Jain 8bc3dfbdb8 Merge pull request #935 from rahuldkjain/dev
chore: update demo link with V2
2025-10-16 14:55:26 +05:30
Rahul Jain be76e4117b chore: update demo link with V2 2025-10-16 14:54:44 +05:30
Rahul Jain a351439d77 Merge pull request #931 from rahuldkjain/dev
chore: load assets with assetPrefix
2025-10-15 21:53:19 +05:30
Rahul Jain 4ee906e1ce chore: load assets with assetPrefix 2025-10-15 21:50:49 +05:30
Rahul Jain 0536c900bc Merge pull request #930 from rahuldkjain/dev
Dev
2025-10-15 21:33:46 +05:30
Rahul Jain 2dbe4c1d94 chore: fix asset path again attempt #4 2025-10-15 21:29:48 +05:30
Rahul Jain 2c3c5981f6 chore: fix asset path again attempt #3 2025-10-15 21:25:57 +05:30
Rahul Jain 99ee31601e chore: fix asset path again and refactor pull_request template 2025-10-15 21:22:53 +05:30
Rahul Jain 1932af0f90 Merge pull request #929 from rahuldkjain/dev
Dev
2025-10-15 21:15:06 +05:30
Rahul Jain b42d14166a Merge pull request #928 from rahuldkjain/rahuldkjain/full-revamp
chore: fix asset path & refactor deploy config
2025-10-15 21:14:33 +05:30
Rahul Jain f43b859e3f Merge pull request #927 from rahuldkjain/dev
chore: fix logo issues and add documentation
2025-10-15 20:52:36 +05:30
Rahul Jain 723efd95e8 Merge pull request #926 from rahuldkjain/rahuldkjain/full-revamp
chore: fix logo path and add documentation
2025-10-15 20:51:47 +05:30
Rahul Jain 957332f302 Merge pull request #919 from rahuldkjain/dev
feat: GPRG V2
2025-10-15 20:38:08 +05:30
Rahul Jain 17d7ab5ec2 Merge pull request #923 from rahuldkjain/rahuldkjain/full-revamp
chore: add support of preview URLs in GitHub UI
2025-10-14 12:01:41 +05:30
Rahul Jain 8468ec9b96 Merge pull request #922 from rahuldkjain/rahuldkjain/full-revamp
chore: fix BMC widget
2025-10-14 11:47:49 +05:30
Rahul Jain d3d2227e19 Merge pull request #921 from rahuldkjain/rahuldkjain/full-revamp
chore: attempt to fix the basePath in preview deployments
2025-10-14 10:53:51 +05:30
Rahul Jain cc1ad37bb9 Merge pull request #920 from rahuldkjain/rahuldkjain/full-revamp
chore: add debug logs for preview deployment step
2025-10-14 10:40:19 +05:30
Rahul Jain 48c6b29b42 Merge pull request #918 from rahuldkjain/rahuldkjain/full-revamp
feat: revamp entire tech stack and UX
2025-10-14 10:21:49 +05:30
8 changed files with 299 additions and 133 deletions
+2 -3
View File
@@ -1,6 +1,6 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
github: rahuldkjain
patreon: # Replace with a single Patreon username
open_collective: github-profile-readme-generator
ko_fi: rahuldkjain
@@ -9,5 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom:
["https://paypal.me/rahuldkjain", "https://www.buymeacoffee.com/rahuldkjain"]
custom: ['https://paypal.me/rahuldkjain', 'https://www.buymeacoffee.com/rahuldkjain']
+160 -28
View File
@@ -1,42 +1,174 @@
<!--
For Work In Progress Pull Requests, please use the Draft PR feature,
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details.
🚀 Thanks for contributing to GitHub Profile README Generator V2!
For a timely review/response, please avoid force-pushing additional
commits if your PR already received reviews or comments.
Before submitting your Pull Request, please ensure you've done the following:
📖 Read the Contributing Guide: https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CONTRIBUTING.md
📖 Read the Code of Conduct: https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CODE_OF_CONDUCT.md
🔄 Follow our Commit Convention: https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/COMMIT_CONVENTION.md
👷‍♀️ Create focused, single-purpose PRs
✅ Test your changes thoroughly
📝 Use conventional commit messages (feat:, fix:, docs:, etc.)
📗 Update documentation and add screenshots for UI changes
Before submitting a Pull Request, please ensure you've done the following:
- 📖 Read the Contributing Guide: https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CONTRIBUTING.md#create-a-pull-request.
- 📖 Read the Code of Conduct: https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CODE_OF_CONDUCT.md.
- 👷‍♀️ Create small PRs. In most cases this will be possible.
- ✅ Provide issue number with link.
- 📝 Use descriptive commit messages.
- 📗 Update any related documentation and include any relevant screenshots.
For Work In Progress PRs, please use the Draft PR feature.
Avoid force-pushing after receiving reviews unless requested.
-->
## What type of PR is this? (check all applicable)
# 🔄 Pull Request
- [ ] Refactor
- [ ] Feature
- [ ] Bug Fix
- [ ] Enhancement
- [ ] Documentation Update
## 📋 **Type of Change** (check all applicable)
## Description
- [ ] 🐛 **Bug Fix** - Fixes an issue without breaking existing functionality
- [ ]**Feature** - Adds new functionality
- [ ]**Performance** - Improves performance without changing functionality
- [ ] ♻️ **Refactor** - Code changes that neither fix bugs nor add features
- [ ] 📚 **Documentation** - Updates to documentation, comments, or README
- [ ] 🎨 **Style** - Code style changes (formatting, missing semi-colons, etc.)
- [ ] 🧪 **Test** - Adding or updating tests
- [ ] 🏗️ **Build** - Changes to build system or dependencies
- [ ] 👷 **CI/CD** - Changes to CI/CD workflows
- [ ] 🔒 **Security** - Security improvements or vulnerability fixes
- [ ]**Accessibility** - Improves accessibility compliance
- [ ] 📱 **Mobile** - Mobile-specific improvements
- [ ] 🌐 **i18n** - Internationalization changes
## Related Tickets & Documents
## 📖 **Description**
## QA Instructions, Screenshots, Recordings
<!-- Provide a clear and concise description of what this PR does -->
_Please replace this line with instructions on how to test your changes, as well
as any relevant images for UI changes._
### **What changed?**
<!-- ## Added tests?
<!-- Describe the changes made -->
- [ ] yes
- [ ] no, because they aren't needed
- [ ] no, because I need help -->
### **Why was this change made?**
## Added to documentation?
<!-- Explain the motivation behind this change -->
- [ ] readme
### **How does this change help users?**
<!-- Describe the user benefit -->
## 🔗 **Related Issues**
<!-- Link related issues using keywords: Closes #123, Fixes #456, Related to #789 -->
- Closes #
- Fixes #
- Related to #
## 🧪 **Testing & Quality Assurance**
### **Testing Done** (check all applicable)
- [ ]**Manual testing** - Tested functionality manually
- [ ] 🧪 **Unit tests** - Added/updated unit tests
- [ ] 🔄 **Integration tests** - Tested with other components
- [ ] 📱 **Mobile testing** - Tested on mobile devices
- [ ]**Accessibility testing** - Tested with screen readers/keyboard nav
- [ ] 🌐 **Cross-browser testing** - Tested in multiple browsers
- [ ] 🎨 **Visual testing** - Checked UI/UX in light/dark themes
### **Test Instructions**
<!-- Provide step-by-step instructions for reviewers to test your changes -->
1.
2.
3.
### **Expected Behavior**
<!-- Describe what should happen when testing -->
## 📸 **Screenshots/Recordings**
<!--
For UI changes, please include:
- Before/after screenshots
- Mobile screenshots
- Dark/light theme screenshots
- Screen recordings for complex interactions
-->
### **Before**
<!-- Screenshot/description of current state -->
### **After**
<!-- Screenshot/description of new state -->
## 📋 **Checklist**
### **Code Quality**
- [ ] 🔍 **TypeScript** - No TypeScript errors (`npm run type-check`)
- [ ] 🧹 **Linting** - No ESLint errors (`npm run lint`)
- [ ] 🎨 **Formatting** - Code is properly formatted (`npm run format`)
- [ ] 🏗️ **Build** - Production build succeeds (`npm run build`)
- [ ]**Performance** - No performance regressions introduced
### **Accessibility**
- [ ]**WCAG Compliance** - Follows WCAG 2.1 AA guidelines
- [ ] ⌨️ **Keyboard Navigation** - All interactive elements are keyboard accessible
- [ ] 🔍 **Screen Reader** - Proper ARIA labels and semantic HTML
- [ ] 🎨 **Color Contrast** - Meets contrast requirements
- [ ] 🎯 **Focus Management** - Visible focus indicators
### **Mobile & Responsive**
- [ ] 📱 **Mobile Responsive** - Works on mobile devices (320px+)
- [ ] 🖥️ **Desktop** - Works on desktop (1024px+)
- [ ] 📐 **Tablet** - Works on tablet sizes (768px+)
- [ ] 🔄 **Orientation** - Works in portrait and landscape
### **Browser Compatibility**
- [ ] 🌐 **Chrome** - Latest version
- [ ] 🦊 **Firefox** - Latest version
- [ ] 🧭 **Safari** - Latest version
- [ ] 📱 **Mobile Safari** - iOS Safari
- [ ] 📱 **Chrome Mobile** - Android Chrome
### **Documentation**
- [ ] 📚 **Code Comments** - Added helpful comments for complex logic
- [ ] 📖 **Documentation** - Updated relevant documentation
- [ ] 📝 **README** - Updated README if needed
- [ ] 🔄 **Changelog** - Will be auto-generated from conventional commits
### **Security & Privacy**
- [ ] 🔒 **No Secrets** - No API keys, passwords, or sensitive data exposed
- [ ] 🛡️ **Input Validation** - Proper validation for user inputs
- [ ] 🔐 **XSS Prevention** - Protected against XSS attacks
- [ ] 🍪 **Privacy Compliant** - Follows GDPR/privacy requirements
## 🚀 **Deployment Notes**
<!-- Any special considerations for deployment -->
- [ ] **No breaking changes** - Backward compatible
- [ ] **Database changes** - N/A (static site)
- [ ] **Environment variables** - No new env vars needed
- [ ] **Third-party dependencies** - No new external dependencies
## 📝 **Additional Notes**
<!-- Any additional information, concerns, or context -->
## 👀 **Reviewers**
<!-- Tag specific reviewers if needed -->
<!-- @username for specific reviewers -->
---
**By submitting this PR, I confirm that:**
- ✅ I have read and agree to the [Code of Conduct](https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CODE_OF_CONDUCT.md)
- ✅ I have followed the [Contributing Guidelines](https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/CONTRIBUTING.md)
- ✅ I have used [Conventional Commits](https://github.com/rahuldkjain/github-profile-readme-generator/blob/master/COMMIT_CONVENTION.md) for my commit messages
- ✅ I have tested my changes thoroughly
- ✅ My code follows the project's coding standards
+13 -5
View File
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://rahuldkjain.github.io/gh-profile-readme-generator">
<a href="https://rahuldkjain.github.io/github-profile-readme-generator">
<img alt="GitHub Profile Readme Generator" src="./src/images/mdg.png" width="60" />
</a>
</p>
@@ -31,7 +31,7 @@
<p align="center"><img src="/public/demo.gif" alt="github-profile-readme-generator gif" /></p>
<p align="center">
<a href="https://rahuldkjain.github.io/gh-profile-readme-generator" target="blank">View Demo</a>
<a href="https://rahuldkjain.github.io/github-profile-readme-generator" target="blank">View Demo</a>
·
<a href="https://github.com/rahuldkjain/github-profile-readme-generator/issues/new/choose">Report Bug</a>
·
@@ -56,11 +56,11 @@ This tool provides an easy way to create a GitHub profile readme with the latest
## 🚀 Demo
<a href="https://rahuldkjain.github.io/gh-profile-readme-generator" target="blank">
<img src="https://img.shields.io/website?url=https%3A%2F%2Frahuldkjain.github.io%2Fgh-profile-readme-generator&logo=github&style=flat-square" />
<a href="https://rahuldkjain.github.io/github-profile-readme-generator" target="blank">
<img src="https://img.shields.io/website?url=https%3A%2F%2Frahuldkjain.github.io%2Fgithub-profile-readme-generator&logo=github&style=flat-square" />
</a>
Try the tool: [GitHub Profile README Generator](https://rahuldkjain.github.io/gh-profile-readme-generator)
Try the tool: [GitHub Profile README Generator](https://rahuldkjain.github.io/github-profile-readme-generator)
## 🧐 Features
@@ -160,6 +160,7 @@ This tool includes privacy-friendly analytics to help improve the user experienc
- **Cookie consent banner** - users can opt-out anytime
- **No personal data** collection - only anonymous usage patterns
## 📄 Font Licensing
This project uses the **Wotfard** font family:
@@ -187,6 +188,13 @@ For commercial use of this project, please verify font licensing requirements.
<a href="https://www.buymeacoffee.com/rahuldkjain" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="23" width="100" style="border-radius:2px" />
</p>
## 🌟 Star History
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=rahuldkjain/github-profile-readme-generator&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=rahuldkjain/github-profile-readme-generator&type=Date" />
<img alt="GPRG Star History Chart" src="https://api.star-history.com/svg?repos=rahuldkjain/github-profile-readme-generator&type=Date" />
</picture>
<hr>
<p align="center">
Developed with ❤️ in India 🇮🇳
+100 -86
View File
@@ -1,101 +1,115 @@
import type { NextConfig } from 'next';
import { PHASE_PRODUCTION_BUILD } from 'next/constants';
const nextConfig: NextConfig = {
// Output as static site for GitHub Pages
output: 'export',
const nextConfig = (phase: string): NextConfig => {
// Determine if we should use basePath (production build, not Surge preview)
const isProductionBuild = phase === PHASE_PRODUCTION_BUILD;
const isSurgePreview = process.env.SURGE_PREVIEW === 'true';
const shouldUseBasePath = isProductionBuild && !isSurgePreview;
const basePath = shouldUseBasePath ? '/github-profile-readme-generator' : '';
// Base path for GitHub Pages (only in production AND not for Surge previews)
basePath:
process.env.NODE_ENV === 'production' && !process.env.SURGE_PREVIEW
? '/github-profile-readme-generator'
: '',
return {
// Output as static site for GitHub Pages
output: 'export',
// Image optimization for static export
images: {
unoptimized: true, // Required for static export
},
// Base path for GitHub Pages (only for production builds, not Surge previews)
basePath,
// Trailing slashes for better compatibility
trailingSlash: true,
// Asset prefix to ensure all assets use the correct path
assetPrefix: shouldUseBasePath ? '/github-profile-readme-generator/' : '',
// Enable strict mode for better error catching
reactStrictMode: true,
// Enable experimental features for better performance
experimental: {
// Optimize CSS
optimizeCss: true,
// Enable optimized package imports for heavy libraries
optimizePackageImports: [
'framer-motion',
'@hookform/resolvers',
'react-markdown',
'remark-gfm',
'rehype-raw',
'rehype-sanitize',
'zod',
'zustand',
'lucide-react',
'@headlessui/react',
],
},
// Compiler options for better performance
compiler: {
// Remove console.log in production
removeConsole: process.env.NODE_ENV === 'production' ? { exclude: ['error', 'warn'] } : false,
// Enable React compiler optimizations
reactRemoveProperties: process.env.NODE_ENV === 'production',
},
// Optimize transpilation
transpilePackages: ['react-markdown', 'remark-gfm', 'rehype-raw', 'rehype-sanitize'],
// Turbopack configuration (replaces webpack config)
turbopack: {
// Enable faster module resolution
resolveAlias: {
// Optimize common imports
'@': './src',
// Environment variables
env: {
NEXT_PUBLIC_BASE_PATH: basePath,
},
},
// Webpack optimizations for development (only when not using Turbopack)
webpack: (config, { dev, isServer }) => {
if (dev && !isServer && !process.env.TURBOPACK) {
// Optimize development builds
config.optimization = {
...config.optimization,
splitChunks: {
chunks: 'all',
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
priority: 10,
},
markdown: {
test: /[\\/]node_modules[\\/](react-markdown|remark-|rehype-)/,
name: 'markdown',
chunks: 'all',
priority: 20,
// Image optimization for static export
images: {
unoptimized: true, // Required for static export
},
// Trailing slashes for better compatibility
trailingSlash: true,
// Enable strict mode for better error catching
reactStrictMode: true,
// Enable experimental features for better performance
experimental: {
// Optimize CSS
optimizeCss: true,
// Enable optimized package imports for heavy libraries
optimizePackageImports: [
'framer-motion',
'@hookform/resolvers',
'react-markdown',
'remark-gfm',
'rehype-raw',
'rehype-sanitize',
'zod',
'zustand',
'lucide-react',
'@headlessui/react',
],
},
// Compiler options for better performance
compiler: {
// Remove console.log in production
removeConsole: isProductionBuild ? { exclude: ['error', 'warn'] } : false,
// Enable React compiler optimizations
reactRemoveProperties: isProductionBuild,
},
// Optimize transpilation
transpilePackages: ['react-markdown', 'remark-gfm', 'rehype-raw', 'rehype-sanitize'],
// Turbopack configuration (replaces webpack config)
turbopack: {
// Enable faster module resolution
resolveAlias: {
// Optimize common imports
'@': './src',
},
},
// Webpack optimizations for development (only when not using Turbopack)
webpack: (config, { dev, isServer }) => {
if (dev && !isServer && !process.env.TURBOPACK) {
// Optimize development builds
config.optimization = {
...config.optimization,
splitChunks: {
chunks: 'all',
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
priority: 10,
},
markdown: {
test: /[\\/]node_modules[\\/](react-markdown|remark-|rehype-)/,
name: 'markdown',
chunks: 'all',
priority: 20,
},
},
},
},
};
};
// Enable faster rebuilds
config.cache = {
type: 'filesystem',
buildDependencies: {
config: [__filename],
},
};
}
// Enable faster rebuilds
config.cache = {
type: 'filesystem',
buildDependencies: {
config: [__filename],
},
};
}
return config;
},
return config;
},
};
};
export default nextConfig;
+4 -3
View File
@@ -7,6 +7,7 @@ import { ToastProvider } from '@/components/ui/toast';
import { BuyMeACoffeeWidget } from '@/components/ui/buy-me-coffee';
import { ConditionalAnalytics } from '@/components/analytics/conditional-analytics';
import { CookieConsent } from '@/components/ui/cookie-consent';
import { getAssetPath } from '@/lib/asset-path';
const robotoMono = Roboto_Mono({
variable: '--font-mono',
@@ -83,11 +84,11 @@ export const metadata: Metadata = {
icons: {
icon: [
{ url: '/favicon.ico', sizes: 'any' },
{ url: '/mdg.png', type: 'image/png' },
{ url: getAssetPath('/mdg.png'), type: 'image/png' },
],
apple: '/mdg.png',
apple: getAssetPath('/mdg.png'),
},
manifest: '/manifest.json',
manifest: getAssetPath('/manifest.json'),
robots: {
index: true,
follow: true,
+3 -4
View File
@@ -1,8 +1,6 @@
import Link from 'next/link';
import Image from 'next/image';
// Import the logo as a static asset for GitHub Pages compatibility
import logoImage from '../../images/mdg.png';
import { getAssetPath } from '@/lib/asset-path';
export function Footer() {
return (
@@ -11,11 +9,12 @@ export function Footer() {
{/* Logo Section */}
<div className="mb-8 flex items-center justify-center gap-3">
<Image
src={logoImage}
src={getAssetPath('/mdg.png')}
alt="GitHub Profile README Generator Logo"
width={48}
height={48}
className="h-12 w-12"
unoptimized
/>
<span className="text-xl font-bold">GitHub Profile README Generator</span>
</div>
+3 -4
View File
@@ -6,9 +6,7 @@ import { usePathname } from 'next/navigation';
import { ThemeToggle } from '@/components/ui/theme-toggle';
import { AccessibilityMenu } from '@/components/ui/accessibility-menu';
import { GitHubStats } from '@/components/ui/github-stats';
// Import the logo as a static asset for GitHub Pages compatibility
import logoImage from '../../images/mdg.png';
import { getAssetPath } from '@/lib/asset-path';
const navigation = [
{ name: 'Generator', href: '/' },
@@ -33,12 +31,13 @@ export function Header({}: HeaderProps = {}) {
<div className="flex items-center gap-4">
<Link href="/" prefetch={true} className="flex items-center gap-3 hover:opacity-80">
<Image
src={logoImage}
src={getAssetPath('/mdg.png')}
alt="GitHub Profile README Generator Logo"
width={40}
height={40}
className="h-10 w-10"
priority
unoptimized
/>
<span className="hidden text-xl font-bold sm:inline-block lg:text-2xl">
GitHub Profile README Generator
+14
View File
@@ -0,0 +1,14 @@
/**
* Get the correct asset path with basePath for GitHub Pages
* Uses NEXT_PUBLIC_BASE_PATH environment variable if set
*/
export function getAssetPath(path: string): string {
// Ensure path starts with /
const normalizedPath = path.startsWith('/') ? path : `/${path}`;
// Use NEXT_PUBLIC_BASE_PATH if set, otherwise detect based on build
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || '';
return `${basePath}${normalizedPath}`;
}