Skip to content

Commit

Permalink
Rename tag 'featured site title' to 'featured site name' for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
k3rs3d committed Jun 2, 2024
1 parent 1722dcb commit bce9dce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct PrecomputedTags {
number_of_sites: usize,
current_time: String,
opml_link: String,
featured_site_title: String,
featured_site_name: String,
featured_site_description: String,
featured_site_url: String,
}
Expand Down Expand Up @@ -176,7 +176,7 @@ impl HtmlGenerator {
table_of_sites: self.generate_sites_table(webring)?,
number_of_sites: webring.len(),
featured_site_url: featured_site.website.url.clone(),
featured_site_title: featured_site.website.name.clone().unwrap_or_else(|| featured_site.website.url.clone()),
featured_site_name: featured_site.website.name.clone().unwrap_or_else(|| featured_site.website.url.clone()),
featured_site_description: featured_site.website.about.clone().unwrap_or_else(|| "".to_string()),
current_time: chrono::Local::now().format("%Y-%m-%d %H:%M:%S").to_string(),
opml_link: "./".to_owned() + &settings.ring_name + ".opml",
Expand Down Expand Up @@ -227,8 +227,8 @@ impl HtmlGenerator {
context.insert("ring_owner_site", &settings.ring_owner_site);
// {{ number_of_sites }}
context.insert("number_of_sites", &precomputed.number_of_sites);
// {{ featured_site_title }}
context.insert("featured_site_title", &precomputed.featured_site_title);
// {{ featured_site_name }}
context.insert("featured_site_name", &precomputed.featured_site_name);
// {{ featured_site_description }}
context.insert("featured_site_description", &precomputed.featured_site_description);
// {{ featured_site_url }}
Expand Down

0 comments on commit bce9dce

Please sign in to comment.