diff options
author | 2022-03-28 17:16:06 -0700 | |
---|---|---|
committer | 2022-03-28 17:16:06 -0700 | |
commit | 4299ab303b0743349fbd01f85340bea61a1c16a8 (patch) | |
tree | 7012176c704d4f254fb2a602101fb7f0a01b8450 /examples/portfolio/src/components | |
parent | 7d29feace103c0cf7c682634d4359b69338c2a1d (diff) | |
download | astro-4299ab303b0743349fbd01f85340bea61a1c16a8.tar.gz astro-4299ab303b0743349fbd01f85340bea61a1c16a8.tar.zst astro-4299ab303b0743349fbd01f85340bea61a1c16a8.zip |
New Markdown API (#2862)
* Implement new markdown plugin with deferred markdown rendering
* feat: switch from `getContent()` fn to `<Content />` API
* update types
* Update packages/astro/src/@types/astro.ts
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* update types
* Create forty-coins-attend.md
Co-authored-by: Nate Moore <nate@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Diffstat (limited to 'examples/portfolio/src/components')
-rw-r--r-- | examples/portfolio/src/components/PortfolioPreview/index.jsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/portfolio/src/components/PortfolioPreview/index.jsx b/examples/portfolio/src/components/PortfolioPreview/index.jsx index 6957e5884..4f1627604 100644 --- a/examples/portfolio/src/components/PortfolioPreview/index.jsx +++ b/examples/portfolio/src/components/PortfolioPreview/index.jsx @@ -2,16 +2,17 @@ import { h } from 'preact'; import Styles from './styles.module.scss'; function PortfolioPreview({ project }) { + const { frontmatter } = project; return ( <div className={Styles.card}> - <div className={Styles.titleCard} style={`background-image:url(${project.img})`}> - <h1 className={Styles.title}>{project.title}</h1> + <div className={Styles.titleCard} style={`background-image:url(${frontmatter.img})`}> + <h1 className={Styles.title}>{frontmatter.title}</h1> </div> <div className="pa3"> - <p className={`${Styles.desc} mt0 mb2`}>{project.description}</p> + <p className={`${Styles.desc} mt0 mb2`}>{frontmatter.description}</p> <div className={Styles.tags}> Tagged: - {project.tags.map((t) => ( + {frontmatter.tags.map((t) => ( <div className={Styles.tag} data-tag={t}> {t} </div> |