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! π