Merge branch 'redirect-stub-index'

This commit is contained in:
Vinta Chen
2026-10-07 18:36:39 +08:00
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -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&hellip;</h1>
<a href="{{ target_url }}">Click here if you are not redirected.</a>
</html>
+1 -1
View File
@@ -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):