add keywords
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2023-10-24 12:48:16 +02:00
parent 68814cdd20
commit 6fe2ec2df3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
6 changed files with 39 additions and 16 deletions

View file

@ -239,13 +239,11 @@ fn get_post(post: &mut Option<File>, filename: String, name: String) -> (Infos,
Infos {
page_title: Some(format!("Post: {}", title)),
page_desc: Some(format!("Blog d'{name}")),
page_kw: Some(
["blog", "blogging", "write", "writing"]
.iter()
.map(|&tag| tag.to_owned())
.chain(tags.into_iter().map(|t| t.name))
.collect::<Vec<String>>()
.join(", "),
page_kw: make_kw(
&["blog", "blogging", "write", "writing"]
.into_iter()
.chain(tags.iter().map(|t| t.name.as_str()))
.collect::<Vec<_>>(),
),
},
toc,

View file

@ -6,7 +6,10 @@ use std::fs::read_to_string;
use crate::{
config::Config,
misc::markdown::{read_file, File, TypeFileMetadata},
misc::{
markdown::{read_file, File, TypeFileMetadata},
utils::make_kw,
},
template::{Infos, NavBar},
};
@ -165,7 +168,7 @@ fn build_page(config: Config) -> String {
Infos {
page_title: Some("Contacts".into()),
page_desc: Some(format!("Réseaux d'{}", config.fc.name.unwrap_or_default())),
page_kw: None,
page_kw: make_kw(&["réseaux sociaux", "email", "contact", "linktree"]),
},
)
}

View file

@ -2,7 +2,10 @@ use std::collections::HashMap;
use crate::{
config::Config,
misc::github::{fetch_pr, ProjectState},
misc::{
github::{fetch_pr, ProjectState},
utils::make_kw,
},
template::{Infos, NavBar},
};
use actix_web::{get, web, HttpResponse, Responder};
@ -153,7 +156,15 @@ async fn build_page(config: Config) -> String {
"Contributions à l'opensource par {}",
config.fc.name.unwrap_or_default()
)),
page_kw: None,
page_kw: make_kw(&[
"github",
"contributions",
"open source",
"développement",
"portfolio",
"projets",
"code",
]),
},
)
}

View file

@ -4,6 +4,7 @@ use ramhorns::Content;
use crate::{
config::Config,
misc::utils::make_kw,
template::{Infos, NavBar},
};
@ -36,7 +37,7 @@ fn build_page(config: Config) -> String {
Infos {
page_title: config.fc.fullname,
page_desc: Some("Page principale".into()),
page_kw: None,
page_kw: make_kw(&["index", "étudiant"]),
},
)
}

View file

@ -5,7 +5,10 @@ use ramhorns::Content;
use crate::{
config::Config,
misc::markdown::{read_file, File, TypeFileMetadata},
misc::{
markdown::{read_file, File, TypeFileMetadata},
utils::make_kw,
},
template::{Infos, NavBar},
};
@ -72,7 +75,14 @@ fn build_page(config: Config) -> String {
"Portfolio d'{}",
config.fc.name.unwrap_or_default()
)),
page_kw: None,
page_kw: make_kw(&[
"développeur",
"portfolio",
"projets",
"programmation",
"applications",
"code",
]),
},
)
}

View file

@ -1,7 +1,7 @@
use actix_web::{get, web, HttpResponse, Responder};
use cached::proc_macro::once;
use crate::{config::Config, template::Infos};
use crate::{config::Config, misc::utils::make_kw, template::Infos};
#[get("/web3")]
async fn page(config: web::Data<Config>) -> impl Responder {
@ -16,7 +16,7 @@ fn build_page(config: Config) -> String {
Infos {
page_title: Some("Mylloon".into()),
page_desc: Some("Coin reculé de l'internet".into()),
page_kw: None,
page_kw: make_kw(&["web3", "blockchain", "nft", "ai"]),
},
)
}