Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit fce5e0ef authored by Seth A Johnson's avatar Seth A Johnson
Browse files

books covers use 'gatsby-images'

parent 6d971ef7
......@@ -58,9 +58,9 @@ module.exports = {
plugins: [
{
resolve: 'gatsby-remark-relative-images',
options: {
name: 'assets',
},
// options: {
// name: 'assets',
// },
},
{
resolve: 'gatsby-remark-images',
......
......@@ -49,7 +49,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
})
}
const { fmImagesToRelative } = require('gatsby-remark-relative-images');
exports.onCreateNode = ({ node, actions, getNode }) => {
const { createNodeField } = actions;
......@@ -62,4 +62,6 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
value,
});
}
fmImagesToRelative(node);
}
import React from "react"
import Img from "gatsby-image"
const Book = ({book}) => {
const {
......@@ -12,7 +13,7 @@ const Book = ({book}) => {
return (
<article>
<img src={cover} alt={`cover of ${title}`} />
<Img fluid={cover.childImageSharp.fluid} alt={`cover of ${title}`} />
<h3>{title}</h3>
<h4>{author}</h4>
<p>{description}</p>
......
......@@ -17,7 +17,13 @@ export const bookQuery = graphql`
description
readLink
buyLink
cover
cover {
childImageSharp {
fluid {
...GatsbyImageSharpFluid
}
}
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment