feat: add canonical redirect, og_image, next_page_url, and sitemap caching across content routers
Implement canonical_redirect helper in content.py to enforce slug-based 301 redirects for gist, news, post, and project detail pages. Add first_image_url helper to extract primary image from item or attachments for Open Graph meta tags. Inject next_page_url into feed, gists, news, and projects list page SEO contexts for pagination link rel. Extend seo.py with SITEMAP_URL_LIMIT, SITEMAP_TTL constants and _sitemap cache variable for future sitemap generation optimization. Update profile page to raise 404 via not_found instead of 302 redirect, and include og_image from avatar_url.
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
<article class="news-card">
|
||||
{% if item.image_url %}
|
||||
<div class="news-card-image">
|
||||
<img src="{{ item.image_url }}" alt="" loading="lazy" class="image-fallback">
|
||||
<img src="{{ item.image_url }}" alt="{{ item.title }}" loading="lazy" class="image-fallback">
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="news-card-body">
|
||||
|
||||
Reference in New Issue
Block a user