update readme

This commit is contained in:
Edgar 2020-11-23 10:25:21 +01:00
parent 5fc836db2a
commit 0743dcdb3d
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85
2 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "sitewriter" name = "sitewriter"
version = "0.2.0" version = "0.2.1"
authors = ["Edgar L. <contact@edgarluque.com>"] authors = ["Edgar L. <contact@edgarluque.com>"]
edition = "2018" edition = "2018"
description = "A sitemap writing library." description = "A sitemap writing library."

View file

@ -20,31 +20,31 @@ use sitewriter::*;
fn main() { fn main() {
let mut sitemap = Sitemap::new(); let mut sitemap = Sitemap::new();
sitemap.urls.push(Url::new("https://edgarluque.com/projects")); sitemap.urls.push(Url::new("https://edgarluque.com/projects".to_owned()));
sitemap.urls.push(Url { sitemap.urls.push(Url {
loc: "https://edgarluque.com/", loc: "https://edgarluque.com/".to_owned(),
changefreq: Some(ChangeFreq::Daily), changefreq: Some(ChangeFreq::Daily),
priority: Some(1.0), priority: Some(1.0),
lastmod: Some(Utc::now()), lastmod: Some(Utc::now()),
}); });
sitemap.urls.push(Url { sitemap.urls.push(Url {
loc: "https://edgarluque.com/blog", loc: "https://edgarluque.com/blog".to_owned(),
changefreq: Some(ChangeFreq::Weekly), changefreq: Some(ChangeFreq::Weekly),
priority: Some(0.8), priority: Some(0.8),
lastmod: Some(Utc::now()), lastmod: Some(Utc::now()),
}); });
sitemap.urls.push(Url { sitemap.urls.push(Url {
loc: "https://edgarluque.com/blog/sitewriter", loc: "https://edgarluque.com/blog/sitewriter".to_owned(),
changefreq: Some(ChangeFreq::Never), changefreq: Some(ChangeFreq::Never),
priority: Some(0.5), priority: Some(0.5),
lastmod: Some(Utc.ymd(2020, 11, 22).and_hms(15, 10, 15)), lastmod: Some(Utc.ymd(2020, 11, 22).and_hms(15, 10, 15)),
}); });
sitemap.urls.push(Url { sitemap.urls.push(Url {
loc: "https://edgarluque.com/blog/some-future-post", loc: "https://edgarluque.com/blog/some-future-post".to_owned(),
changefreq: Some(ChangeFreq::Never), changefreq: Some(ChangeFreq::Never),
priority: Some(0.5), priority: Some(0.5),
lastmod: Some(Utc.from_utc_datetime(&Local.ymd(2020, 12, 5).and_hms(12, 30, 0).naive_utc())), lastmod: Some(Utc.from_utc_datetime(&Local.ymd(2020, 12, 5).and_hms(12, 30, 0).naive_utc())),