add keywords

This commit is contained in:
Mylloon 2023-04-19 20:07:53 +02:00
parent 5bb91eeb0f
commit 00f65be0f3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 12 additions and 0 deletions

View file

@ -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,
},
)
}

View file

@ -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,
},
)
}

View file

@ -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,
},
)
}

View file

@ -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,
},
)
}

View file

@ -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,
},
)
}

View file

@ -11,8 +11,12 @@ pub struct Template {
#[derive(Default)]
pub struct Infos {
/// Title
pub page_title: Option<String>,
/// Description
pub page_desc: Option<String>,
/// Keywords
pub page_kw: Option<String>,
}
#[derive(Content)]
@ -20,6 +24,7 @@ struct Data<T> {
app_name: String,
page_title: Option<String>,
page_desc: Option<String>,
page_kw: Option<String>,
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,
})
}

View file

@ -6,6 +6,7 @@
<link rel="stylesheet" href="/css/blog.css" />
<meta name="author" content="Mylloon" />
<meta name="description" content="{{page_desc}} " />
<meta name="keywords" content="{{page_kw}} " />
<base target="_blank" />
<!-- Icones (https://realfavicongenerator.net/) -->