Skip to content

Commit

Permalink
feat: allow passing in description as prop to layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonappah committed Jul 31, 2024
1 parent d218796 commit c579891
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/layouts/base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import { ViewTransitions } from 'astro:transitions';
interface Props {
title: string
description?: string
}
const {url} = Astro
let ogImage = (url.origin + '/og' + (url.pathname === '/' ? '/index' : url.pathname)).replace(/\/$/, '') + '.png'
const site = 'Comet Robotics at UT Dallas'
const { title } = Astro.props
const { title, description } = Astro.props
---
<!DOCTYPE html>
<html lang="en" transition:animate="none">
Expand All @@ -30,7 +31,7 @@ const { title } = Astro.props
<SEOMetadata
siteName={site}
title={title ?? site}
description={'We are a group of robot enthusiasts with the goal of promoting robotics at UT Dallas and in the surrounding area through outreach, projects and workshops.'}
description={description ?? 'We are a group of robot enthusiasts with the goal of promoting robotics at UT Dallas and in the surrounding area through outreach, projects and workshops.'}
favicon={'/favicon.svg'}
author={site}
astroSitemap={true}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/events/kickoff.astro
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ let stats: Stat[] = [
]
---

<BaseLayout title={projectTitle}>
<BaseLayout title={projectTitle} description={shortDescription}>
<div class="main-container">
<div class="content-container">
<div class="description">
Expand Down

0 comments on commit c579891

Please sign in to comment.