Changing Text Content
Let's make your first real contribution to the K12worX website! This guide walks you through changing text content safely and effectively.
What You'll Learn
- How to find text in the codebase
- Safe ways to change content
- How to preview changes
- What to test after changing text
- When to commit your changes
Why Start with Text Changes?
Text changes are the safest type of edit because:
- ✅ Hard to break functionality
- ✅ Easy to undo
- ✅ Immediate visual feedback
- ✅ Builds confidence
Perfect for your first real contribution!
Prerequisites
Before starting:
- ✅ Dev server running (
npm run dev) - ✅ Browser open at
http://localhost:3000 - ✅ VS Code open with the project
Exercise 1: Change a Heading
Step 1: Identify What to Change
Let's change the main homepage headline.
Current text (on localhost:3000):
"Every Student Can Achieve Their Full Academic Potential"
Open your browser and find this text on the homepage.
Step 2: Find It in Code
Method 1: Search in VS Code
- Press
Cmd+Shift+F(Mac) orCtrl+Shift+F(Windows) - Type:
Every Student Can Achieve - Hit Enter
- See results - should show
app/page.tsx
Method 2: Direct Navigation
- Open file explorer in VS Code
- Navigate to
app/page.tsx - Press
Cmd+F(Mac) orCtrl+F(Windows) - Search for
Every Student
Step 3: Make the Change
Find this code (around line 16):
<h1 className="text-4xl md:text-6xl font-bold mb-6">
Every Student Can Achieve Their Full Academic Potential
</h1>
Change the text to:
<h1 className="text-4xl md:text-6xl font-bold mb-6">
Empowering Students Through Community Tutoring
</h1>
Or write your own headline!
Step 4: Save and Preview
- Save:
Cmd+SorCtrl+S - Check terminal: Should say "Compiled successfully"
- Check browser: Headline should update automatically!
Step 5: Verify the Change
Checklist:
- New text appears on the page
- Formatting looks correct (not broken)
- No errors in terminal
- No errors in browser console (F12)
If something's wrong: Hit Cmd+Z or Ctrl+Z to undo!
Exercise 2: Update a Paragraph
Find the Subtitle
Look for (around line 19):
<p className="text-xl md:text-2xl mb-8 max-w-4xl mx-auto">
A student-powered network of AI-amplified tutors and mentors, celebrating the potential of students in underserved communities across the United States.
</p>
Make It Your Own
Change to:
<p className="text-xl md:text-2xl mb-8 max-w-4xl mx-auto">
High school and college students building an AI-powered tutoring network that closes educational opportunity gaps for K-8 students nationwide.
</p>
Or create your own description!
Test It
- Save
- Check browser
- Read the new text - does it make sense?
- Is it the right length? (Not too long or too short?)
Exercise 3: Change a Section Heading
Find "Our Mission" Section
Search for: Our Mission
You'll find (around line 44):
<h2 className="text-3xl font-bold text-gray-900 mb-4">Our Mission</h2>
<p className="text-lg text-gray-600 max-w-3xl mx-auto">
To celebrate the potential of students in underserved US communities by closing the educational opportunity gap.
</p>
Update Both Heading and Description
Change to:
<h2 className="text-3xl font-bold text-gray-900 mb-4">What We Do</h2>
<p className="text-lg text-gray-600 max-w-3xl mx-auto">
We connect motivated student tutors with K-8 learners, amplified by AI technology to maximize impact and close educational opportunity gaps.
</p>
Verify Consistency
After changing a section heading:
- Does it fit the page theme?
- Is the tone consistent with other sections?
- Does the description match the heading?
Exercise 4: Update Button Text
Find Call-to-Action Buttons
Search for: Join the Launching Committee
You'll find (around line 24):
<Link
href="/launching"
className="px-8 py-3 bg-white text-blue-600 font-semibold rounded-lg hover:bg-gray-100 transition-colors"
>
Join the Launching Committee
</Link>
Change Button Text
Options:
- "Get Started Today"
- "Join Our Team"
- "Learn More"
- "Sign Up Now"
Pick one and update:
<Link
href="/launching"
className="px-8 py-3 bg-white text-blue-600 font-semibold rounded-lg hover:bg-gray-100 transition-colors"
>
Get Started Today
</Link>
Test Button
- Save and preview
- Click the button - does it still work?
- Check that link goes to correct page
- Does new text fit in the button (not too long)?
Exercise 5: Update Card Content
Find Feature Cards
Search for: Laser-Focused Sessions
You'll find (around line 100):
<h3 className="text-xl font-semibold mb-2">Laser-Focused Sessions</h3>
<p className="text-gray-600">
AI-driven insights identify specific learning gaps, making every tutoring hour count.
</p>
Change Card Text
Update to:
<h3 className="text-xl font-semibold mb-2">Personalized Learning</h3>
<p className="text-gray-600">
AI technology helps tutors identify each student's unique needs and deliver targeted support.
</p>
Consistency Check
When changing cards:
- Keep similar length across all cards
- Maintain consistent tone
- Check alignment and spacing
Best Practices for Text Changes
1. Keep It Concise
{/* ✅ Good: Clear and concise */}
<p>High school students tutoring K-8 learners with AI support.</p>
{/* ❌ Too verbose */}
<p>
This innovative program leverages the unique capabilities of highly motivated
high school and college students who are passionate about education to provide
comprehensive tutoring services to K-8 students in underserved communities...
</p>
2. Match the Tone
{/* ✅ Professional yet friendly */}
<h2>Join Our Community</h2>
{/* ❌ Too casual */}
<h2>Hey! Come hang with us!</h2>
{/* ❌ Too formal */}
<h2>Request Admission to Our Organization</h2>
3. Check Grammar and Spelling
Before saving:
- Read the text aloud
- Check for typos
- Verify punctuation
- Ensure capitalization is consistent
4. Consider Length
{/* ✅ Fits well in button */}
<button>Get Started</button>
<button>Learn More</button>
{/* ❌ Too long for button */}
<button>Click Here To Get Started With Our Amazing Program</button>
5. Preserve Structure
Only change the text between tags:
{/* ✅ Correct */}
<h1 className="text-4xl font-bold">
New Heading Text
</h1>
{/* ❌ Don't change the tags or classes */}
<h2 className="text-2xl">
New Heading Text
</h2>
Common Text Elements to Change
Headings
<h1>Main page title</h1>
<h2>Section heading</h2>
<h3>Subsection heading</h3>
Paragraphs
<p>Body text describing features, benefits, or information.</p>
Links
<Link href="/page">Link text</Link>
Buttons
<button>Button text</button>
Badges/Labels
<span>Badge text</span>
Finding Text to Change
Method 1: Visual Search
- Browse the website
- Note what you want to change
- Use
Cmd+Shift+Fto search for that text
Method 2: Component Search
- Know which page (e.g., homepage)
- Open
app/page.tsx - Browse through the file
- Edit what you find
Method 3: Follow the Structure
Homepage → app/page.tsx
About page → app/about/page.tsx
Contact page → app/contact/page.tsx
Testing Your Changes
Visual Testing
Check these:
- Text displays correctly
- Formatting is intact
- Spacing looks right
- No text overflow
- Responsive on mobile (resize browser)
Functional Testing
If you changed:
- Link text: Click it, verify destination
- Button text: Click it, ensure it works
- Form labels: Check form still works
Browser Testing
Test in multiple browsers (if available):
- Chrome
- Firefox
- Safari
- Edge
Undoing Changes
Option 1: Undo in Editor
Cmd+Z (Mac) or Ctrl+Z (Windows)
Use when: You just made the change
Option 2: Git Checkout
# Discard all changes in one file
git checkout -- app/page.tsx
# Discard all changes in project
git checkout -- .
Use when: You want to reset to last commit
Option 3: Git Stash
# Temporarily save changes
git stash
# Restore stashed changes later
git stash pop
Use when: You want to save changes for later
When to Commit
Good times to commit:
- ✅ After completing a set of related changes
- ✅ When changes are tested and working
- ✅ Before starting a different task
- ✅ End of work session
Don't commit:
- ❌ Broken code
- ❌ Incomplete changes
- ❌ Untested changes
We'll cover Git in detail in Chapter 07!
Troubleshooting
Problem: Text doesn't update in browser
Solutions:
- Did you save the file? (
Cmd+SorCtrl+S) - Check terminal for errors
- Hard refresh:
Cmd+Shift+RorCtrl+Shift+R - Restart dev server:
Ctrl+C, thennpm run dev
Problem: Layout breaks after text change
Causes:
- Text too long (overflows container)
- Accidentally deleted a closing tag
Solutions:
- Make text shorter
- Check for missing
</tag> - Undo with
Cmd+Zand try again
Problem: Changed wrong text
Solutions:
Cmd+Zto undo- Or
git checkout -- filenameto reset file
Problem: Can't find the text in code
Try:
- Search for partial text
- Check spelling (exact match needed)
- Search in different files
- Look in
components/folder if not inapp/
Quick Reference
Find text:
Cmd+Shift+F (Mac) or Ctrl+Shift+F (Windows)
Find in current file:
Cmd+F (Mac) or Ctrl+F (Windows)
Save file:
Cmd+S (Mac) or Ctrl+S (Windows)
Undo:
Cmd+Z (Mac) or Ctrl+Z (Windows)
Hard refresh:
Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
Reset file:
git checkout -- filename
Practice Checklist
Try changing these items for practice:
- Homepage main headline
- Homepage subtitle
- A section heading
- Button text
- Card title and description
- Footer text (if you can find it!)
What's Next
Now that you're comfortable changing text, let's learn how to add new navigation links: