Hello, awesome contributor! 🎉 We're super excited to have you join our community of creators. This guide will help you understand our project structure and contribution process. Let's make something incredible together! 💫
# Clone the repository
git clone https://github.com/<your-username>/<repo-name>.git
# Navigate to project directory
cd <repo-name>
# Set up upstream remote
git remote add upstream https://github.com/<original-owner>/<repo-name>.git
# Create and switch to your feature branch
git checkout -b feature/your-amazing-feature- ✅ Pull latest changes from upstream
- ✅ Create a new branch for your feature
- ✅ Read through our coding standards below
- ✅ Plan your changes before you start
YourProject/
├── 📄 index.html # Main entry point
├── 📂 css/ # All CSS files
│ ├── styles.css # Homepage styles
│ ├── header.css # Global header styles
│ ├── footer.css # Global footer styles
│ ├── about.css # About page styles
│ └── contact.css # Contact page styles
├── 📂 js/ # JavaScript files
│ ├── main.js # Main JavaScript file
│ ├── about.js # About page scripts
│ └── contact.js # Contact page scripts
├── 📂 assets/ # Media files
│ ├── 📂 images/ # Image files (.jpg or .png only and recommended-file-size: 500KB maximum!)
│ │ ├── hero_banner.png
│ │ └── about_team.jpg
│ └── 📂 videos/ # Video files (.mp4 and max-file-size: 102400 KB ie. 100MB)
│ └── intro_video.mp4
└── 📂 pages/ # HTML pages
├── about.html
└── contact.html
- ✨ Format:
.jpgand.pngONLY - 📦 Size: Optimize all images (max 500KB recommended)
- 🏷️ Naming Pattern:
<section>_<description>.jpg- ✅ Good:
hero_banner.jpg,team_photo.jpg - ❌ Bad:
IMG001.jpg,hero banner.jpg
- ✅ Good:
- 🔤 Use only lowercase letters
- 🚫 No numbers or special characters
- ✨ Must be descriptive
- ✅ Good:
images,styles,scripts - ❌ Bad:
img1,style2,misc_files
- ✅ Good:
- 🔤 Use lowercase with underscores
- 📝 Be descriptive but concise
- ✅ Good:
about_page.css,contact_form.js - ❌ Bad:
page1.css,script.js
- ✅ Good:
Always use relative paths to link images, pages, and other resources. This ensures our project remains portable and works across different environments.
From index.html to different resources:
<!-- Linking images -->
<img src="./assets/images/logo.jpg" alt="Logo">
<img src="./assets/images/hero/banner.jpg" alt="Banner">
<!-- Linking CSS -->
<link rel="stylesheet" href="./css/styles.css">
<link rel="stylesheet" href="./css/about.css">
<!-- Linking JavaScript -->
<script src="./js/main.js"></script>
<!-- Linking pages -->
<a href="./pages/about.html">About Us</a>From pages/about.html to different resources:
<!-- Linking images -->
<img src="../assets/images/logo.jpg" alt="Logo">
<img src="../assets/images/about/team.jpg" alt="Team">
<!-- Linking CSS -->
<link rel="stylesheet" href="../css/styles.css">
<link rel="stylesheet" href="../css/about.css">
<!-- Linking JavaScript -->
<script src="../js/about.js"></script>
<!-- Linking back to home -->
<a href="../index.html">Home</a>Don't use these types of paths:
<!-- ❌ Absolute system paths -->
<img src="/Users/username/Desktop/project/images/logo.jpg">
<img src="C:/Projects/website/images/logo.jpg">
<!-- ❌ Absolute root paths -->
<img src="/images/logo.jpg">
<link href="/css/styles.css">
<!-- ❌ Full URLs to local files -->
<img src="https://github.com/username/repo/images/logo.jpg">./means current directory../means up one directory../../means up two directories
Let's say you're linking resources from different files:
YourProject/
├── index.html
├── css/
│ └── styles.css
├── assets/
│ └── images/
│ └── logo.jpg
└── pages/
└── about/
└── team.html
From index.html to logo.jpg:
✅ <img src="./assets/images/logo.jpg">
❌ <img src="/Users/me/project/assets/images/logo.jpg">From pages/about/team.html to logo.jpg:
✅ <img src="../../assets/images/logo.jpg">
❌ <img src="/assets/images/logo.jpg">-
Use CLI to Verify Paths
# From project root, verify file exists ls ./assets/images/logo.jpg # Check relative path from a specific directory cd pages/about && ls ../../assets/images/logo.jpg
-
Test Local Navigation
- Always test your links locally before committing
- Use Live Server in VS Code to catch path issues
- Verify paths work when project is moved to different locations
-
Path Troubleshooting
- If image doesn't load, right-click and "Open image in new tab" to debug path
- Check browser console for 404 errors
- Verify file extensions match exactly (case-sensitive)
/* Example of CSS organization */
/* 1. Global Styles */
/* 2. Layout & Grid */
/* 3. Components */
/* 4. Page-specific styles */
/* 5. Keyframes */
/* 6. media queries */- 🎯 Use meaningful variable names
- 📝 Comment your code
- ✨ Follow DRY (Don't Repeat Yourself) principles
- 🌿 Create a new branch:
git checkout -b feature/your-feature-name- 💾 Make your changes and commit:
git add .
git commit -m "✨ Add: Brief description of your changes"- 🔄 Keep your branch updated:
git fetch upstream
git rebase upstream/main- 🚀 Push your changes:
git push origin feature/your-feature-nameBefore submitting your PR, ensure:
- Code follows our naming conventions
- Images are optimized and properly named
- No unnecessary files are included
- Code is properly commented
- All links are working
- No console errors
- 👀 Submit your PR
- 🔍 Wait for code review
- 📝 Address any feedback
- ✨ Get approved and merged!
Remember: Every contribution matters! 🌟 Whether it's fixing a typo or adding a feature, you're helping make this project better!
Happy Coding! 🚀