This commit is contained in:
parent
68814cdd20
commit
6fe2ec2df3
6 changed files with 39 additions and 16 deletions
|
@ -239,13 +239,11 @@ fn get_post(post: &mut Option<File>, filename: String, name: String) -> (Infos,
|
||||||
Infos {
|
Infos {
|
||||||
page_title: Some(format!("Post: {}", title)),
|
page_title: Some(format!("Post: {}", title)),
|
||||||
page_desc: Some(format!("Blog d'{name}")),
|
page_desc: Some(format!("Blog d'{name}")),
|
||||||
page_kw: Some(
|
page_kw: make_kw(
|
||||||
["blog", "blogging", "write", "writing"]
|
&["blog", "blogging", "write", "writing"]
|
||||||
.iter()
|
.into_iter()
|
||||||
.map(|&tag| tag.to_owned())
|
.chain(tags.iter().map(|t| t.name.as_str()))
|
||||||
.chain(tags.into_iter().map(|t| t.name))
|
.collect::<Vec<_>>(),
|
||||||
.collect::<Vec<String>>()
|
|
||||||
.join(", "),
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
toc,
|
toc,
|
||||||
|
|
|
@ -6,7 +6,10 @@ use std::fs::read_to_string;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Config,
|
config::Config,
|
||||||
misc::markdown::{read_file, File, TypeFileMetadata},
|
misc::{
|
||||||
|
markdown::{read_file, File, TypeFileMetadata},
|
||||||
|
utils::make_kw,
|
||||||
|
},
|
||||||
template::{Infos, NavBar},
|
template::{Infos, NavBar},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -165,7 +168,7 @@ fn build_page(config: Config) -> String {
|
||||||
Infos {
|
Infos {
|
||||||
page_title: Some("Contacts".into()),
|
page_title: Some("Contacts".into()),
|
||||||
page_desc: Some(format!("Réseaux d'{}", config.fc.name.unwrap_or_default())),
|
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"]),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,10 @@ use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Config,
|
config::Config,
|
||||||
misc::github::{fetch_pr, ProjectState},
|
misc::{
|
||||||
|
github::{fetch_pr, ProjectState},
|
||||||
|
utils::make_kw,
|
||||||
|
},
|
||||||
template::{Infos, NavBar},
|
template::{Infos, NavBar},
|
||||||
};
|
};
|
||||||
use actix_web::{get, web, HttpResponse, Responder};
|
use actix_web::{get, web, HttpResponse, Responder};
|
||||||
|
@ -153,7 +156,15 @@ async fn build_page(config: Config) -> String {
|
||||||
"Contributions à l'opensource par {}",
|
"Contributions à l'opensource par {}",
|
||||||
config.fc.name.unwrap_or_default()
|
config.fc.name.unwrap_or_default()
|
||||||
)),
|
)),
|
||||||
page_kw: None,
|
page_kw: make_kw(&[
|
||||||
|
"github",
|
||||||
|
"contributions",
|
||||||
|
"open source",
|
||||||
|
"développement",
|
||||||
|
"portfolio",
|
||||||
|
"projets",
|
||||||
|
"code",
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ use ramhorns::Content;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Config,
|
config::Config,
|
||||||
|
misc::utils::make_kw,
|
||||||
template::{Infos, NavBar},
|
template::{Infos, NavBar},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ fn build_page(config: Config) -> String {
|
||||||
Infos {
|
Infos {
|
||||||
page_title: config.fc.fullname,
|
page_title: config.fc.fullname,
|
||||||
page_desc: Some("Page principale".into()),
|
page_desc: Some("Page principale".into()),
|
||||||
page_kw: None,
|
page_kw: make_kw(&["index", "étudiant"]),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@ use ramhorns::Content;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
config::Config,
|
config::Config,
|
||||||
misc::markdown::{read_file, File, TypeFileMetadata},
|
misc::{
|
||||||
|
markdown::{read_file, File, TypeFileMetadata},
|
||||||
|
utils::make_kw,
|
||||||
|
},
|
||||||
template::{Infos, NavBar},
|
template::{Infos, NavBar},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +75,14 @@ fn build_page(config: Config) -> String {
|
||||||
"Portfolio d'{}",
|
"Portfolio d'{}",
|
||||||
config.fc.name.unwrap_or_default()
|
config.fc.name.unwrap_or_default()
|
||||||
)),
|
)),
|
||||||
page_kw: None,
|
page_kw: make_kw(&[
|
||||||
|
"développeur",
|
||||||
|
"portfolio",
|
||||||
|
"projets",
|
||||||
|
"programmation",
|
||||||
|
"applications",
|
||||||
|
"code",
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use actix_web::{get, web, HttpResponse, Responder};
|
use actix_web::{get, web, HttpResponse, Responder};
|
||||||
use cached::proc_macro::once;
|
use cached::proc_macro::once;
|
||||||
|
|
||||||
use crate::{config::Config, template::Infos};
|
use crate::{config::Config, misc::utils::make_kw, template::Infos};
|
||||||
|
|
||||||
#[get("/web3")]
|
#[get("/web3")]
|
||||||
async fn page(config: web::Data<Config>) -> impl Responder {
|
async fn page(config: web::Data<Config>) -> impl Responder {
|
||||||
|
@ -16,7 +16,7 @@ fn build_page(config: Config) -> String {
|
||||||
Infos {
|
Infos {
|
||||||
page_title: Some("Mylloon".into()),
|
page_title: Some("Mylloon".into()),
|
||||||
page_desc: Some("Coin reculé de l'internet".into()),
|
page_desc: Some("Coin reculé de l'internet".into()),
|
||||||
page_kw: None,
|
page_kw: make_kw(&["web3", "blockchain", "nft", "ai"]),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue