Skip to content

Commit

Permalink
feat: restore meta
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed Sep 3, 2024
1 parent f6e4f1d commit d582617
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 27 deletions.
35 changes: 19 additions & 16 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ pub fn App() -> impl IntoView {
view! {
<Stylesheet id="leptos" href="/pkg/blog.css" />
<Title text="Tech Diaries - The Official Rust-DD Developer Blog" />
<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">
Expand Down
21 changes: 10 additions & 11 deletions src/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit d582617

Please sign in to comment.