Open 17-09 opened 4 years ago
I tried various options, first of all, I tried to do this:
Create the components.js file here (in the existing gatsby-plugin-theme-ui folder)
src/gatsby-plugin-theme-ui/components.js
And import there import 'prismjs/components/prism-r'
But nothing came of this (I tried adding prism.r.js to different places), then I tried different other options. But, I'm afraid this is not something that can be implemented "out of the box", I think that in order to implement this, we need to add new Chronoblog functionality.
But I'm not so sure! Perhaps there is a way about which I do not know.
Thanks for your efforts. I'm new to gatsby, I'll try to find another way!
we only need do shadow gatsby-plugin-theme-ui/components.js like this
Then update styles.code at gatsby-plugin-theme-ui/index.js like this
I think we should add this customize to the readme file @Ganevru
Great job 👍! Yes, it is definitely worth adding to the readme. I think it will be better if you do it (since this is your contribution).
I already added information about Prism in the readme, I think it should be posted somewhere here: https://github.com/Chronoblog/gatsby-theme-chronoblog#adding-support-for-additional-programming-languages
Only, I think it will be better if instead of screenshots, you place the code there.
I followed the guide https://theme-ui.com/packages/prism, did the shadow
components.js
but it did not work. Please correct me if I'm wrong!