diff --git a/src/app.rs b/src/app.rs index 43d4d39..4c44cc6 100644 --- a/src/app.rs +++ b/src/app.rs @@ -15,22 +15,25 @@ pub fn App() -> impl IntoView { view! { - <Meta name="description" content="Tech Diaries - The Official Rust-DD Developer Blog" /> - // <Meta property="og:type" content="website" /> - // <Meta property="og:url" content="https://rust-dd.com/" /> - // <Meta property="og:image" content="https://static.rust-dd.com/rust-dd_custom_bg.png" /> - // <Meta property="og:image:type" content="image/png" /> - // <Meta property="og:image:width" content="1200" /> - // <Meta property="og:image:height" content="627" /> - // <Meta - // property="og:site_name" - // content="Tech Diaries - The Official Rust-DD Developer Blog" - // /> - // <Meta property="og:title" content="Tech Diaries - The Official Rust-DD Developer Blog" /> - // <Meta - // property="og:description" - // content="Tech Diaries - The Official Rust-DD Developer Blog" - // /> + <Meta + name="description" + content="Discover the Rust-DD framework, enabling the application of domain-driven design (DDD) principles in Rust. Write efficient, safe, and clean code with this modern development tool." + /> + <Meta property="og:type" content="website" /> + <Meta property="og:title" content="Tech Diaries - The Official Rust-DD Developer Blog" /> + <Meta + property="og:site_name" + content="Tech Diaries - The Official Rust-DD Developer Blog" + /> + <Meta + property="og:description" + content="Discover the Rust-DD framework, enabling the application of domain-driven design (DDD) principles in Rust. Write efficient, safe, and clean code with this modern development tool." + /> + <Meta property="og:url" content="https://rust-dd.com/" /> + <Meta property="og:image" content="https://static.rust-dd.com/rust-dd_custom_bg.png" /> + <Meta property="og:image:type" content="image/png" /> + <Meta property="og:image:width" content="1200" /> + <Meta property="og:image:height" content="627" /> <div class="overflow-auto h-screen text-white bg-[#1e1e1e]"> <header class="fixed top-0 right-0 left-0 z-10 py-6 px-4 md:px-6 bg-[#1e1e1e]/80 backdrop-blur-md"> <div class="container mx-auto max-w-5xl"> diff --git a/src/post.rs b/src/post.rs index f5989ac..d2efbaa 100644 --- a/src/post.rs +++ b/src/post.rs @@ -15,23 +15,22 @@ pub fn Component() -> impl IntoView { view! { <Suspense fallback=|| ()> - {move || { post.with(|post| { let post = post.clone().unwrap_or_default(); view! { <Title text=post.title.to_string() /> <Meta name="description" content=post.summary.to_string() /> - // <Meta property="og:type" content="article" /> - // <Meta property="og:title" content=post.title.to_string() /> - // <Meta property="og:description" content=post.summary.to_string() /> - // {post - // .tags - // .into_iter() - // .map(|tag| { - // view! { <Meta name="keywords" content=tag.to_string() /> } - // }) - // .collect::<Vec<_>>()} + <Meta property="og:type" content="article" /> + <Meta property="og:title" content=post.title.to_string() /> + <Meta property="og:description" content=post.summary.to_string() /> + {post + .tags + .into_iter() + .map(|tag| { + view! { <Meta name="keywords" content=tag.to_string() /> } + }) + .collect::<Vec<_>>()} <article> <div class="flex flex-col gap-4 mx-auto max-w-3xl"> <p class="text-4xl font-semibold">{post.title.clone()}</p>