diff options
author | Michael-F-Bryan <michaelfbryan@gmail.com> | 2020-05-27 03:12:57 +0800 |
---|---|---|
committer | Michael-F-Bryan <michaelfbryan@gmail.com> | 2020-05-27 03:12:57 +0800 |
commit | da55cf273f8f054a5837ba2804dd70976ea6a3a0 (patch) | |
tree | 890d5e8f66d857f7b5398ef3f3934fee3bc784e6 /src/config.rs | |
parent | a6ab4d8402eaa3ffcd6ac955fbd054c31d6c07c2 (diff) |
Changed redirect mapping to HashMap<String, String> and improved error handling
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs index 71edbaf2..dc712bbb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -517,7 +517,7 @@ pub struct HtmlConfig { pub livereload_url: Option<String>, /// The mapping from old pages to new pages/URLs to use when generating /// redirects. - pub redirect: HashMap<PathBuf, String>, + pub redirect: HashMap<String, String>, } impl Default for HtmlConfig { @@ -741,9 +741,9 @@ mod tests { git_repository_url: Some(String::from("https://foo.com/")), git_repository_icon: Some(String::from("fa-code-fork")), redirect: vec![ - (PathBuf::from("index.html"), String::from("overview.html")), + (String::from("index.html"), String::from("overview.html")), ( - PathBuf::from("nexted/page.md"), + String::from("nexted/page.md"), String::from("https://rust-lang.org/"), ), ] |