0
0
SEO Fundamentalsknowledge~30 mins

Content freshness and updates in SEO Fundamentals - Mini Project: Build & Apply

Choose your learning style9 modes available
Content Freshness and Updates
📖 Scenario: You manage a website that shares news articles. To keep your site popular, you want to show visitors that your content is fresh and up to date.
🎯 Goal: Build a simple plan to track and update content freshness on your website.
📋 What You'll Learn
Create a dictionary with article titles and their last update dates
Add a variable to set the freshness threshold in days
Write a loop to find articles older than the threshold
Mark those articles as needing an update
💡 Why This Matters
🌍 Real World
Websites and blogs need to keep their content fresh to attract visitors and rank well in search engines.
💼 Career
SEO specialists and content managers use content freshness strategies to improve website visibility and user engagement.
Progress0 / 4 steps
1
Create the articles data
Create a dictionary called articles with these exact entries: 'Climate Change': '2024-01-10', 'Tech Innovations': '2023-12-15', 'Health Tips': '2024-03-01', 'Travel Guide': '2023-11-20'
SEO Fundamentals
Need a hint?

Use a dictionary with article titles as keys and date strings as values.

2
Set the freshness threshold
Create a variable called freshness_days and set it to 90 to represent the number of days before an article is considered outdated.
SEO Fundamentals
Need a hint?

This number helps decide if an article is too old.

3
Find outdated articles
Write a for loop using title and date to iterate over articles.items(). Inside the loop, add a comment # Check if article is older than freshness_days to prepare for the next step.
SEO Fundamentals
Need a hint?

Use for title, date in articles.items(): to loop through the dictionary.

4
Mark articles needing update
Inside the for loop, add code to mark articles older than freshness_days by adding their titles to a list called needs_update. First, create needs_update = [] before the loop. Then, inside the loop, add a comment # Add title to needs_update if outdated and the code to append the title.
SEO Fundamentals
Need a hint?

Use Python's datetime module to compare dates and add outdated titles to needs_update.