diff --git a/components/site/tests/site.rs b/components/site/tests/site.rs index db2960e..ddb01de 100644 --- a/components/site/tests/site.rs +++ b/components/site/tests/site.rs @@ -128,6 +128,10 @@ fn can_build_site_without_live_reload() { assert!(file_exists!(public, "an-old-url/old-page/index.html")); assert!(file_contains!(public, "an-old-url/old-page/index.html", "something-else")); + // html aliases work + assert!(file_exists!(public, "an-old-url/an-old-alias.html")); + assert!(file_contains!(public, "an-old-url/an-old-alias.html", "something-else")); + // redirect_to works assert!(file_exists!(public, "posts/tutorials/devops/index.html")); assert!(file_contains!(public, "posts/tutorials/devops/index.html", "docker")); diff --git a/test_site/content/posts/fixed-slug.md b/test_site/content/posts/fixed-slug.md index ace8ae1..afec24b 100644 --- a/test_site/content/posts/fixed-slug.md +++ b/test_site/content/posts/fixed-slug.md @@ -3,7 +3,7 @@ title = "Fixed slug" description = "" slug = "something-else" date = 2017-01-01 -aliases = ["/an-old-url/old-page"] +aliases = ["/an-old-url/old-page", "/an-old-url/an-old-alias.html"] +++ A simple page with a slug defined