mirror of
https://github.com/vinta/awesome-python.git
synced 2026-11-08 02:15:12 -06:00
fix: drop noindex from category redirect stubs
Redirect stubs for renamed category URLs carried a robots noindex meta, so Search Console filed them under "Excluded by 'noindex' tag" instead of treating the instant meta refresh as a permanent redirect, and the old URLs' ranking was not passed to the new pages. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
<link rel="canonical" href="{{ target_url }}">
|
||||
<script>location="{{ target_url }}"</script>
|
||||
<meta http-equiv="refresh" content="0; url={{ target_url }}">
|
||||
<meta name="robots" content="noindex">
|
||||
<h1>Redirecting…</h1>
|
||||
<a href="{{ target_url }}">Click here if you are not redirected.</a>
|
||||
</html>
|
||||
|
||||
@@ -1083,7 +1083,7 @@ class TestBuild:
|
||||
stub = (site / "categories" / "old-widgets" / "index.html").read_text(encoding="utf-8")
|
||||
assert '<link rel="canonical" href="https://awesome-python.com/categories/widgets/">' in stub
|
||||
assert '<meta http-equiv="refresh" content="0; url=https://awesome-python.com/categories/widgets/">' in stub
|
||||
assert '<meta name="robots" content="noindex">' in stub
|
||||
assert "noindex" not in stub
|
||||
assert "old-widgets" not in (site / "sitemap.xml").read_text(encoding="utf-8")
|
||||
|
||||
def test_build_renders_category_intro_and_uses_lead_as_meta_description(self, tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user