fix links

This commit is contained in:
Maciej Jur 2024-09-21 23:38:48 +02:00
parent 2c77a3c2d8
commit 22d8866c53
Signed by: kamov
GPG key ID: 191CBFF5F72ECAFD
2 changed files with 6 additions and 5 deletions

View file

@ -5,7 +5,8 @@ watch:
cargo run --release -- watch cargo run --release -- watch
serve: serve:
python -m http.server -d ./dist echo "http://[::1]:1234/"
python -m http.server 1234 -b ::1 -d ./dist
deploy: build deploy: build
rsync -Pavzq ./dist/ kamoshi:/var/www/kamoshi.org --delete rsync -Pavzq ./dist/ kamoshi:/var/www/kamoshi.org --delete

View file

@ -70,7 +70,7 @@ struct LinkDate {
fn main() { fn main() {
let args = Args::parse(); let args = Args::parse();
let website = Website::design() let website = Website::setup()
.add_collections(vec![ .add_collections(vec![
Collection::glob_with::<Post>( Collection::glob_with::<Post>(
"content", "content",
@ -138,7 +138,7 @@ fn main() {
.into_iter() .into_iter()
.map(|(path, meta)| LinkDate { .map(|(path, meta)| LinkDate {
link: Link { link: Link {
path: Utf8Path::new("/").join(path), path: Utf8Path::new("/").join(path.parent().unwrap()),
name: meta.title.clone(), name: meta.title.clone(),
desc: meta.desc.clone(), desc: meta.desc.clone(),
}, },
@ -158,7 +158,7 @@ fn main() {
.into_iter() .into_iter()
.map(|(path, meta)| LinkDate { .map(|(path, meta)| LinkDate {
link: Link { link: Link {
path: Utf8Path::new("/").join(path), path: Utf8Path::new("/").join(path.parent().unwrap()),
name: meta.title.clone(), name: meta.title.clone(),
desc: meta.desc.clone(), desc: meta.desc.clone(),
}, },
@ -178,7 +178,7 @@ fn main() {
.into_iter() .into_iter()
.map(|(path, meta)| LinkDate { .map(|(path, meta)| LinkDate {
link: Link { link: Link {
path: Utf8Path::new("/").join(path), path: Utf8Path::new("/").join(path.parent().unwrap()),
name: meta.title.clone(), name: meta.title.clone(),
desc: meta.desc.clone(), desc: meta.desc.clone(),
}, },