Fix Stack Overflow crawling platform name mismatch

The issue was that Stack Overflow was configured with platform name
'stackoverflow' but the data collection code expected 'stackexchange'.
Fixed by:

1. Renamed platform from 'stackoverflow' to 'stackexchange' in platform_config.json
2. Added Stack Overflow collection target to enable crawling
3. Updated templates and app.py to use the correct platform name
4. Added default 'stackoverflow' community alongside existing featured/newest

This resolves the platform name mismatch that prevented Stack Overflow
from being crawlable.

Fixes #23

~claude

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
chelsea
2025-10-12 03:07:41 -05:00
parent 29a9d521e7
commit b47155cc36
4 changed files with 18 additions and 5 deletions

2
app.py
View File

@@ -1155,7 +1155,7 @@ def settings_communities():
{'id': 'technology', 'name': 'Technology', 'platform': 'reddit'},
{'id': 'hackernews', 'name': 'Hacker News', 'platform': 'hackernews'},
{'id': 'lobsters', 'name': 'Lobsters', 'platform': 'lobsters'},
{'id': 'stackoverflow', 'name': 'Stack Overflow', 'platform': 'stackoverflow'},
{'id': 'stackoverflow', 'name': 'Stack Overflow', 'platform': 'stackexchange'},
]
return render_template('settings_communities.html',

View File

@@ -143,13 +143,20 @@
}
]
},
"stackoverflow": {
"stackexchange": {
"name": "Stack Overflow",
"icon": "📚",
"color": "#f48024",
"prefix": "",
"supports_communities": false,
"communities": [
{
"id": "stackoverflow",
"name": "Stack Overflow",
"display_name": "Stack Overflow",
"icon": "📚",
"description": "Programming Q&A community"
},
{
"id": "featured",
"name": "Featured",
@@ -257,6 +264,12 @@
"community": "https://hnrss.org/frontpage",
"max_posts": 50,
"priority": "low"
},
{
"platform": "stackexchange",
"community": "stackoverflow",
"max_posts": 50,
"priority": "medium"
}
]
}

View File

@@ -105,7 +105,7 @@
🐙 View on GitHub
{% elif post.platform == 'devto' %}
📝 View on Dev.to
{% elif post.platform == 'stackoverflow' %}
{% elif post.platform == 'stackexchange' %}
📚 View on Stack Overflow
{% else %}
🔗 View Original Source

View File

@@ -79,7 +79,7 @@
.platform-icon.reddit { background: #ff4500; }
.platform-icon.hackernews { background: #ff6600; }
.platform-icon.lobsters { background: #ac130d; }
.platform-icon.stackoverflow { background: #f48024; }
.platform-icon.stackexchange { background: #f48024; }
.community-grid {
display: grid;
@@ -269,7 +269,7 @@
<div class="platform-group">
<h3>
<span class="platform-icon {{ platform }}">
{% if platform == 'reddit' %}R{% elif platform == 'hackernews' %}H{% elif platform == 'lobsters' %}L{% elif platform == 'stackoverflow' %}S{% endif %}
{% if platform == 'reddit' %}R{% elif platform == 'hackernews' %}H{% elif platform == 'lobsters' %}L{% elif platform == 'stackexchange' %}S{% endif %}
</span>
{{ platform|title }}
</h3>