From 092ebd3ce69c73f6cf9ce4e327af94d1e1bfb291 Mon Sep 17 00:00:00 2001 From: Eric Zhu Date: Wed, 25 Oct 2023 12:15:46 -0400 Subject: [PATCH] add talks to sitemap --- src/sitemap.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sitemap.rs b/src/sitemap.rs index be9dd38..7238c9f 100644 --- a/src/sitemap.rs +++ b/src/sitemap.rs @@ -11,7 +11,7 @@ pub fn init(state: super::SiteState) -> Result> { let smw = sitemap::writer::SiteMapWriter::new(&mut sm); let mut urlwriter = smw.start_urlset()?; urlwriter.url("https://ericz.me")?; - let static_pages = vec!["contact", "news", "projects", "blog", "now", "projects/tags", "blog/tags"]; + let static_pages = vec!["contact", "news", "projects", "blog", "now", "projects/tags", "blog/tags", "talks", "talks/tags"]; for page in static_pages { urlwriter.url(format!("https://ericz.me/{}", page))?; } @@ -21,6 +21,9 @@ pub fn init(state: super::SiteState) -> Result> { for blog in state.blog { urlwriter.url(format!("https://ericz.me/blog/{}", blog.slug))?; } + for talk in state.talks { + urlwriter.url(format!("https://ericz.me/talks/{}", talk.slug))?; + } urlwriter.end()?; Ok(sm) }