Fixing frontpage image foo for episodes
This commit is contained in:
parent
becd7c7cbf
commit
fbfda46913
1 changed files with 4 additions and 6 deletions
|
|
@ -4,6 +4,7 @@ import Link from 'next/link'
|
|||
import getConfig from 'next/config'
|
||||
import Head from 'next/head'
|
||||
import Image from 'next/image';
|
||||
import config from '../data/internal/config';
|
||||
import { FEEDS, getFeed } from "../lib/rss"
|
||||
import { generatePodcastFeeds, generateRssFeed } from "../data/internal/feed-generator"
|
||||
import { generateSitemap } from "../data/internal/sitemap-generator"
|
||||
|
|
@ -46,12 +47,8 @@ export async function getStaticProps(context) {
|
|||
|
||||
const pagedata = {'title': 'Angry Beanie'}
|
||||
|
||||
// const tadfeed = FEEDS.find((tadfeed) => tadfeed.name === "tad");
|
||||
// const tadfullfeed = await getFeed(tadfeed.url)
|
||||
// const tadfirstitem = tadfullfeed.items[0]
|
||||
|
||||
return {
|
||||
props: { article, pagedata, config: serverRuntimeConfig, firstimage, episodedata: epdata},
|
||||
props: { article, pagedata, config: serverRuntimeConfig, firstimage, episodedata: epdata, siteConfig: config},
|
||||
revalidate: 60 // will be passed to the page component as props
|
||||
}
|
||||
}
|
||||
|
|
@ -89,8 +86,9 @@ function HomePage (props) {
|
|||
<div className="col-sm-4">
|
||||
<div className="card">
|
||||
<div className="card-img-top">
|
||||
{/* <img src={props.episodedata.Logo.data.attributes.url} alt={episode.show} height={props.episodedata.Logo.data.attributes.height}></img> */}
|
||||
<Image
|
||||
src={props.config.base_path + "/" + props.episodedata.Logo.data.attributes.url}
|
||||
src={props.siteConfig.siteURL + props.episodedata.Logo.data.attributes.url}
|
||||
alt={episode.show}
|
||||
layout="fixed"
|
||||
height={props.episodedata.Logo.data.attributes.height}
|
||||
|
|
|
|||
Loading…
Reference in a new issue