diff --git a/Makefile b/Makefile index f57dc6b..d04960d 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ watch: cargo run --release -- watch serve: - python -m http.server -d ./dist + echo "http://[::1]:1234/" + python -m http.server 1234 -b ::1 -d ./dist deploy: build rsync -Pavzq ./dist/ kamoshi:/var/www/kamoshi.org --delete diff --git a/src/main.rs b/src/main.rs index adff723..30026d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,7 +70,7 @@ struct LinkDate { fn main() { let args = Args::parse(); - let website = Website::design() + let website = Website::setup() .add_collections(vec![ Collection::glob_with::( "content", @@ -138,7 +138,7 @@ fn main() { .into_iter() .map(|(path, meta)| LinkDate { link: Link { - path: Utf8Path::new("/").join(path), + path: Utf8Path::new("/").join(path.parent().unwrap()), name: meta.title.clone(), desc: meta.desc.clone(), }, @@ -158,7 +158,7 @@ fn main() { .into_iter() .map(|(path, meta)| LinkDate { link: Link { - path: Utf8Path::new("/").join(path), + path: Utf8Path::new("/").join(path.parent().unwrap()), name: meta.title.clone(), desc: meta.desc.clone(), }, @@ -178,7 +178,7 @@ fn main() { .into_iter() .map(|(path, meta)| LinkDate { link: Link { - path: Utf8Path::new("/").join(path), + path: Utf8Path::new("/").join(path.parent().unwrap()), name: meta.title.clone(), desc: meta.desc.clone(), },