mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 14:29:36 +01:00
fix: update gatsby-remark-images options
This commit is contained in:
parent
a0b28f128c
commit
babcddb3a2
@ -93,6 +93,7 @@ module.exports = {
|
||||
resolve: 'gatsby-transformer-remark',
|
||||
options: {
|
||||
plugins: [
|
||||
'gatsby-remark-relative-images',
|
||||
{
|
||||
resolve: 'gatsby-remark-katex',
|
||||
options: {
|
||||
@ -101,7 +102,11 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-remark-images',
|
||||
options: { maxWidth: 960 }
|
||||
options: {
|
||||
maxWidth: 960,
|
||||
withWebp: true,
|
||||
ignoreFileExtensions: [],
|
||||
}
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-remark-responsive-iframe',
|
||||
|
@ -2,13 +2,10 @@
|
||||
|
||||
const _ = require('lodash');
|
||||
const { createFilePath } = require('gatsby-source-filesystem');
|
||||
const { fmImagesToRelative } = require('gatsby-remark-relative-images');
|
||||
|
||||
const onCreateNode = ({ node, actions, getNode }) => {
|
||||
const { createNodeField } = actions;
|
||||
|
||||
fmImagesToRelative(node);
|
||||
|
||||
if (node.internal.type === 'MarkdownRemark') {
|
||||
if (typeof node.frontmatter.slug !== 'undefined') {
|
||||
createNodeField({
|
||||
|
Loading…
Reference in New Issue
Block a user