A lightweight, vanilla JavaScript and CSS grid component designed to fetch and display your public GitHub repositories directly on your personal portfolio website using the GitHub REST API.
- Live Dynamic Loading: Automatically displays your repositories without manual site updates.
- Smart Sorting: Configured to show your most recently updated projects first.
- Responsive Design: Clean CSS Grid layout that looks great on mobile, tablet, and desktop screens.
- Zero Dependencies: Built entirely with plain HTML, CSS, and native JavaScript
fetch().
Follow these simple steps to integrate this component into your website:
- Copy the HTML: Place the structure from
index.htmlinside your desired portfolio section. - Add the CSS: Link the
style.cssstylesheet in your<head>tag. - Include the Script: Link the
script.jsfile at the bottom of your<body>tag. - Change the Username: Open
scriptp.jsand update theGITHUB_USERNAMEvariable to your own:const GITHUB_USERNAME = "your-github-username"; `ex: etor01`;
You can tweak the Javascript parameters in script.js to change what data shows up:
- Change the amount of repos displayed: Adjust the
per_page=6parameter in the API URL fetch string to your preferred number. - Change the theme: Update the hex color codes in
style.cssunder.repo-cardto match your personal brand styling.
Want to make your own version or suggest improvements?
- Fork the Repository: Click the Fork button at the top right of this repository page to create a copy in your account.
- Clone the Fork: Clone your new repository to your local machine:
git clone https://github.com
- Create a Feature Branch:
git checkout -b feature/AmazingFeature
- Commit Changes: Commit your customized modifications:
git commit -m 'Add some AmazingFeature' - Push to GitHub: Push the branch up to your profile:
git push origin feature/AmazingFeature
- Open a Pull Request: Go to the original repository page and click "New Pull Request" to merge your enhancements.
Please note that the GitHub REST API enforces a limit of 60 unauthenticated requests per hour per IP address. If you hit this rate limit while building, your page will gracefully show a "Could not load projects" message. Thank you and have fun with it.