tyrion / gridsome-plugin-netlify-cms-paths Goto Github PK
View Code? Open in Web Editor NEWFix markdown image paths to work with Netlify CMS
Fix markdown image paths to work with Netlify CMS
Right now you can convert one frontmatter field on load thanks to this plugin.
I have a lot of pages where the user should be able to choose images for multiple elements on one page.
It would be great to be able to pass multiple elements to the cover field option in an array.
coverField: ['image-left', 'image-right', 'image-bottom']
Is that possible?
When this plugin is enabled all the remark options under source-filesystem
seem to have no effect. Here is a snippet of my config:
{
use: '@gridsome/source-filesystem',
options: {
path: 'posts/**/*.md',
typeName: 'Post',
remark: {
config: {
footnotes: true
}
}
},
},
If the remark config is global instead of under source-filesystem
then everything is fine.
By the way thanks for making this plugin! π
I just installed the plugin and configured it, when I try to run my development server I get an error:
TypeError: Cannot read property 'text/markdown' of undefined
at new NetlifyPaths (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome-plugin-netlify-cms-paths/index.js:54:56)
at config.plugins.map.entry (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:87:24)
at Array.map (<anonymous>)
at App.init (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:71:25)
at App.bootstrap (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/App.js:49:23)
at module.exports (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/app/index.js:11:13)
at module.exports (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/lib/develop.js:13:21)
at args (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/index.js:41:12)
at Command.program.command.description.option.option.action.args (/home/edmund/projects/projects/my own/theNinjaBlog/node_modules/gridsome/index.js:8:44)
at Command.listener (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:315:8)
at Command.emit (events.js:198:13)
at Command.parseArgs (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:651:12)
at Command.parse (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/node_modules/commander/index.js:474:21)
at Object.<anonymous> (/home/edmund/.nvm/versions/node/v10.16.3/lib/node_modules/@gridsome/cli/bin/gridsome.js:70:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
I think it has to do with getting the MIME type.
The requirement for the transformer-remark plugin "^0.3.2" breaks compatibility with the latest versions of Gridsome and transformer-remark. Can this be updated without any breakages?
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: troop-307-gridsome@undefined
npm ERR! Found: @gridsome/[email protected]
npm ERR! node_modules/@gridsome/transformer-remark
npm ERR! @gridsome/transformer-remark@"^0.6.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @gridsome/transformer-remark@"^0.3.2" from [email protected]
npm ERR! node_modules/gridsome-plugin-netlify-cms-paths
npm ERR! gridsome-plugin-netlify-cms-paths@"^0.3.1" from the root project
Using an earlier version of transformer-remark breaks compatibility with latest Gridsome. Thanks!
I'm keen to get an upstream fix of some sort, so I created these issues:
Do you know if there's something special in Gridsome about using the directories as specified in the blog post?
media_folder: 'static/media'
public_folder: '/media'
This might be an obvious question, but Gridsome is still pretty light on the documentation unfortunately. I looked at the plugin and didn't see anything there.
I'd like to use content/media
for my files, but it just refuses to work if I use something other than static
as media_folder
I try this. Thanks!
Hello,
Thank you for this plugin :-)
When i use a markdown link for example:
[mailto](mailto:[email protected])
There is an error during the build.
Error: /static/uploads/mailto:[email protected] was not found
at throwError (/node_modules/gridsome/lib/app/build/executeQueries.js:21:13)
at pMap (/node_modules/gridsome/lib/app/build/executeQueries.js:50:9)
Since Gridsome has redone some stuff, this plugin triggers two deprecation warnings. Still works, but that will change.
Avoid using api.store directly. Use the actions in api.loadSource() instead.
./node_modules/gridsome-plugin-netlify-cms-paths/index.js:32:44
The store.addContentType() method has been renamed to store.addCollection().
./node_modules/gridsome-plugin-netlify-cms-paths/inde⦠x.js:47:31
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.