Skip to content

Commit

Permalink
feat: add og info
Browse files Browse the repository at this point in the history
  • Loading branch information
Phosphorus-M committed Sep 18, 2023
1 parent b1a33d2 commit 8ceaf9e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion src/components/layout.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use chrono::Datelike;
use leptos::*;

use crate::{
Expand All @@ -8,11 +9,31 @@ use crate::{
#[component]
// This is a common Layout component that will be used by all pages.
pub fn Layout(children: Children) -> impl IntoView {
let year = chrono::Utc::now().year();

view! {
<Html attrs=vec![("lang", "es")]/>
<Title>"RustLang Es | Blog"</Title>
<Title>{format!("Blog de Rust Lang en Español {year}")}</Title>
<Head>
<meta charset="utf-8"/>
<meta property="og:site_name" content=format!("Blog de Rust Lang en Español {year}")/>
<meta property="og:title" content=format!("Blog de Rust Lang en Español {year}")/>
<meta
property="og:description"
content="Somos una comunidad de Rust hispana, buscamos la promoción del lenguaje de programación Rust."
/>
<meta
name="description"
content="Somos una comunidad de Rust hispana, buscamos la promoción del lenguaje de programación Rust."
/>
<meta property="og:url" content="https://rustlanges.github.io"/>
<meta property="og:image" content="https://rustlanges.github.io/preview_concept.png"/>
<meta
property="twitter:image"
content="https://rustlanges.github.io/preview_concept.png"
/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@rustlang"/>
{if cfg!(debug_assertions) {
view! { <link rel="stylesheet" href="/output.css"/> }
} else {
Expand Down

0 comments on commit 8ceaf9e

Please sign in to comment.