added cache, s3 to taskmanager, ask cache if result is the same, among others
This commit is contained in:
@@ -73,17 +73,18 @@ pub fn generate_rss(
|
||||
format!(
|
||||
r#"<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{safe_title}</title>
|
||||
<description>{safe_description}</description>
|
||||
<link>{link}</link>
|
||||
<language>en-us</language>
|
||||
<ttl>60</ttl>
|
||||
<generator>Kyouma 1.0.0-SE</generator>
|
||||
<atom:link href="https://wyattjmiller.com/posts.xml" rel="self" type="application/rss+xml" />
|
||||
{}
|
||||
</channel>
|
||||
</rss>"#,
|
||||
<channel>
|
||||
<title>{safe_title}</title>
|
||||
<description>{safe_description}</description>
|
||||
<link>{link}</link>
|
||||
<language>en-us</language>
|
||||
<ttl>60</ttl>
|
||||
<generator>Kyouma 1.0.0-SE</generator>
|
||||
<atom:link href="https://wyattjmiller.com/posts.xml" rel="self" type="application/rss+xml" />
|
||||
{}
|
||||
</channel>
|
||||
</rss>
|
||||
"#,
|
||||
rss_entries
|
||||
)
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ impl SitemapEntry {
|
||||
pub fn generate_sitemap(entries: &HashMap<String, SitemapEntry>) -> String {
|
||||
let urls = entries
|
||||
.values()
|
||||
.into_iter()
|
||||
.map(|entry| entry.to_item())
|
||||
.collect::<String>();
|
||||
format!(
|
||||
@@ -39,21 +38,21 @@ pub fn generate_sitemap(entries: &HashMap<String, SitemapEntry>) -> String {
|
||||
|
||||
pub fn get_static_pages(entries: &mut HashMap<String, SitemapEntry>, web_url: &String) {
|
||||
entries.insert(
|
||||
(entries.len() + 1).to_string(),
|
||||
"10000".to_string(),
|
||||
SitemapEntry {
|
||||
location: web_url.clone(),
|
||||
lastmod: chrono::Utc::now(),
|
||||
},
|
||||
);
|
||||
entries.insert(
|
||||
(entries.len() + 1).to_string(),
|
||||
"10001".to_string(),
|
||||
SitemapEntry {
|
||||
location: format!("{}/posts", web_url),
|
||||
lastmod: chrono::Utc::now(),
|
||||
},
|
||||
);
|
||||
entries.insert(
|
||||
(entries.len() + 1).to_string(),
|
||||
"10002".to_string(),
|
||||
SitemapEntry {
|
||||
location: format!("{}/projects", web_url),
|
||||
lastmod: chrono::Utc::now(),
|
||||
|
Reference in New Issue
Block a user