diff --git a/component-library/components/cards/cards.eleventy.liquid b/component-library/components/cards/cards.eleventy.liquid
index 0e48e5e..6d9a4d7 100644
--- a/component-library/components/cards/cards.eleventy.liquid
+++ b/component-library/components/cards/cards.eleventy.liquid
@@ -3,7 +3,7 @@
{% for card in cards %}
- {% image card.media.url card.media.alt 500 %}
+ {% image card.media.image.url card.media.image.alt 500 %}
diff --git a/eleventy.config.js b/eleventy.config.js
index 5cbc222..40761c8 100644
--- a/eleventy.config.js
+++ b/eleventy.config.js
@@ -10,7 +10,7 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(svgContents);
eleventyConfig.addShortcode("image", async function (src, alt, widths, sizes) {
- if (src === undefined) {
+ if (src === undefined || src === null) {
return "";
}
diff --git a/src/index.html b/src/index.html
index 133d0e0..f2dc228 100644
--- a/src/index.html
+++ b/src/index.html
@@ -8,30 +8,24 @@
cards:
- media:
image:
- url: ''
- alt: ''
- url: /assets/campus.jpg
- alt: Campus
+ url: /assets/campus.jpg
+ alt: Campus
heading:
text: Admissions
url: '#'
text: Learn more about the admissions process and how to apply.
- media:
image:
- url: ''
- alt: ''
- url: /assets/lecture.jpg
- alt: Lecture hall
+ url: /assets/lecture.jpg
+ alt: Lecture hall
heading:
text: Academics
url: '#'
text: Explore our academic programs and departments.
- media:
image:
- url: ''
- alt: ''
- url: /assets/research.jpg
- alt: Research lab
+ url: /assets/research.jpg
+ alt: Research lab
heading:
text: Research
url: '#'