shooontan / gatsby-remark-attr Goto Github PK
View Code? Open in Web Editor NEWGatsby remark plugin for adding attribute in markdown
Home Page: https://www.npmjs.com/package/gatsby-remark-attr
Gatsby remark plugin for adding attribute in markdown
Home Page: https://www.npmjs.com/package/gatsby-remark-attr
Hi,
I'm unsure if this is an issue of MDX or remark-attr.
I can't appear to use:
This is a paragraph.{.class-name}
I tried adding 'p' and 'paragraph' to the options.elemets as well.
Did you manage to use this on paragraph text?
Hello,
my problem is, that if I try to use gatsby-remark-attr on images, the instruction in the curly braces isn't parsed and is displayed as text under the image. (for example: "{width=100}")
On Hyperlinks it works very well, so this doesn't seem to be my own mistake.
I'm using the following plugins for markdown:
Other plugins:
Is there any way to solve my problem? Maybe your documentation is incomplete and I need an additional plugin?
When you have a chance, can you make the pull request to upgrade your dependent remark-attr package to use the latest version (^0.8.0)? I am stuck running an older version of node (v6.11) on a production machine and cannot upgrade for the foreseeable future, and when building the gatsby site am getting an error at line 177 of node_module/remark-attr/index.js (^0.6.2), specifically the use of unsupported spread operators in objects.
The newer version of remark-attr should fix this issue, as it appears to bypass the use of spread operators. I'm running node v8 on my local machine, and everything works great, but am unfortunately stuck with a lower version of node on the production machine.
Can this be made compatible with gatsby-remark-images
? It converts markdown images ![img](/some.jpg)
into span
s of class gatsby-resp-image-wrapper
which don't seem to inherit any specified attributes.
The best I could find so far is to wrap images in working elements:
_![img](/some.jpg)_{style="display: block; width: 300px; margin: auto;"}
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.