mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-01-13 15:29:16 +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',
|
resolve: 'gatsby-transformer-remark',
|
||||||
options: {
|
options: {
|
||||||
plugins: [
|
plugins: [
|
||||||
|
'gatsby-remark-relative-images',
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-remark-katex',
|
resolve: 'gatsby-remark-katex',
|
||||||
options: {
|
options: {
|
||||||
@ -101,7 +102,11 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-remark-images',
|
resolve: 'gatsby-remark-images',
|
||||||
options: { maxWidth: 960 }
|
options: {
|
||||||
|
maxWidth: 960,
|
||||||
|
withWebp: true,
|
||||||
|
ignoreFileExtensions: [],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-remark-responsive-iframe',
|
resolve: 'gatsby-remark-responsive-iframe',
|
||||||
|
@ -2,13 +2,10 @@
|
|||||||
|
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const { createFilePath } = require('gatsby-source-filesystem');
|
const { createFilePath } = require('gatsby-source-filesystem');
|
||||||
const { fmImagesToRelative } = require('gatsby-remark-relative-images');
|
|
||||||
|
|
||||||
const onCreateNode = ({ node, actions, getNode }) => {
|
const onCreateNode = ({ node, actions, getNode }) => {
|
||||||
const { createNodeField } = actions;
|
const { createNodeField } = actions;
|
||||||
|
|
||||||
fmImagesToRelative(node);
|
|
||||||
|
|
||||||
if (node.internal.type === 'MarkdownRemark') {
|
if (node.internal.type === 'MarkdownRemark') {
|
||||||
if (typeof node.frontmatter.slug !== 'undefined') {
|
if (typeof node.frontmatter.slug !== 'undefined') {
|
||||||
createNodeField({
|
createNodeField({
|
||||||
|
Loading…
Reference in New Issue
Block a user