From 00f65be0f31b1aa0e1937cf36b8d9b9d5046dbd4 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 19 Apr 2023 20:07:53 +0200 Subject: [PATCH] add keywords --- src/routes/contrib.rs | 1 + src/routes/index.rs | 1 + src/routes/networks.rs | 1 + src/routes/portfolio.rs | 1 + src/routes/web3.rs | 1 + src/template.rs | 6 ++++++ templates/blog/head.html | 1 + 7 files changed, 12 insertions(+) diff --git a/src/routes/contrib.rs b/src/routes/contrib.rs index 105307d..0b7ff0c 100644 --- a/src/routes/contrib.rs +++ b/src/routes/contrib.rs @@ -140,6 +140,7 @@ pub async fn get_page(config: Config) -> String { Infos { page_title: Some("Mes contributions".to_string()), page_desc: Some("Contributions à l'opensource par Anri".to_string()), + page_kw: None, }, ) } diff --git a/src/routes/index.rs b/src/routes/index.rs index 5597de2..d7ec7e3 100644 --- a/src/routes/index.rs +++ b/src/routes/index.rs @@ -20,6 +20,7 @@ pub fn get_page(config: Config) -> String { Infos { page_title: Some("Mylloon".to_string()), page_desc: Some("Page principale".to_string()), + page_kw: None, }, ) } diff --git a/src/routes/networks.rs b/src/routes/networks.rs index 383377a..891c4d3 100644 --- a/src/routes/networks.rs +++ b/src/routes/networks.rs @@ -20,6 +20,7 @@ pub fn get_page(config: Config) -> String { Infos { page_title: Some("Mes réseaux".to_string()), page_desc: Some("Réseaux d'Anri".to_string()), + page_kw: None, }, ) } diff --git a/src/routes/portfolio.rs b/src/routes/portfolio.rs index f202066..ca9cfba 100644 --- a/src/routes/portfolio.rs +++ b/src/routes/portfolio.rs @@ -76,6 +76,7 @@ pub fn get_page(config: Config) -> String { Infos { page_title: Some("Portfolio".to_string()), page_desc: Some("Portfolio d'Anri".to_string()), + page_kw: None, }, ) } diff --git a/src/routes/web3.rs b/src/routes/web3.rs index 11e9df1..0069f12 100644 --- a/src/routes/web3.rs +++ b/src/routes/web3.rs @@ -20,6 +20,7 @@ pub fn get_page(config: Config) -> String { Infos { page_title: Some("Mylloon".to_string()), page_desc: Some("Coin reculé de l'internet".to_string()), + page_kw: None, }, ) } diff --git a/src/template.rs b/src/template.rs index 7c06d9e..80daf7c 100644 --- a/src/template.rs +++ b/src/template.rs @@ -11,8 +11,12 @@ pub struct Template { #[derive(Default)] pub struct Infos { + /// Title pub page_title: Option, + /// Description pub page_desc: Option, + /// Keywords + pub page_kw: Option, } #[derive(Content)] @@ -20,6 +24,7 @@ struct Data { app_name: String, page_title: Option, page_desc: Option, + page_kw: Option, data: T, } @@ -32,6 +37,7 @@ impl Template { app_name: self.app_name.clone(), page_title: info.page_title, page_desc: info.page_desc, + page_kw: info.page_kw, data, }) } diff --git a/templates/blog/head.html b/templates/blog/head.html index c6d5219..0f2f56f 100644 --- a/templates/blog/head.html +++ b/templates/blog/head.html @@ -6,6 +6,7 @@ +