Skip to content

Commit

Permalink
add talks to sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Oct 25, 2023
1 parent 5a7f080 commit 092ebd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sitemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn init(state: super::SiteState) -> Result<Vec<u8>> {
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))?;
}
Expand All @@ -21,6 +21,9 @@ pub fn init(state: super::SiteState) -> Result<Vec<u8>> {
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)
}
Expand Down

0 comments on commit 092ebd3

Please sign in to comment.