0.0.1-alpha.5

This commit is contained in:
2026-09-28 09:50:20 +02:00
parent 8f6f072e11
commit c17b7068a3
26 changed files with 1952 additions and 23 deletions

View File

@@ -0,0 +1,53 @@
// file: crates/knowledge-web-lib/src/site.rs
// version: 1
//! Public facade identities used by the shared Web runtime.
/// Public Knowledge facade served by one launcher.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ServerSite {
/// Normative PGR facade.
Pgr,
/// Procedural HOWTOs facade.
Howtos,
/// Contextual snippets facade.
Snippets,
}
impl crate::ServerSite {
/// Return the domain content family associated with this facade.
pub fn content_family(self) -> knowledge_domain_lib::ContentFamily {
match self {
crate::ServerSite::Pgr => return knowledge_domain_lib::ContentFamily::Pgr,
crate::ServerSite::Howtos => return knowledge_domain_lib::ContentFamily::Howto,
crate::ServerSite::Snippets => return knowledge_domain_lib::ContentFamily::Snippet,
}
}
/// Return the page title used by the foundation renderer.
pub fn page_title(self) -> &'static str {
match self {
crate::ServerSite::Pgr => return "SaseDev Knowledge — PGR",
crate::ServerSite::Howtos => return "SaseDev Knowledge — HOWTOs",
crate::ServerSite::Snippets => return "SaseDev Knowledge — Snippets",
}
}
/// Return the main heading used by the foundation renderer.
pub fn heading(self) -> &'static str {
match self {
crate::ServerSite::Pgr => return "Project Governance Rules",
crate::ServerSite::Howtos => return "HOWTOs",
crate::ServerSite::Snippets => return "Snippets",
}
}
/// Return the short explanatory lead used by the foundation renderer.
pub fn lead(self) -> &'static str {
match self {
crate::ServerSite::Pgr => return "Connaissance normative de gouvernance.",
crate::ServerSite::Howtos => return "Guides procéduraux et explicatifs.",
crate::ServerSite::Snippets => return "Fragments courts et contextualisés.",
}
}
}