Chronoblog / gatsby-theme-chronoblog

⏳ Chronoblog is a Gatsbyjs theme specifically designed to create a personal website. The main idea of ​​Chronoblog is to allow you not only to write a personal blog but also to keep a record of everything important that you have done.
https://chronoblog.now.sh
MIT License
129 stars 26 forks source link

[Code Highlight] Add csharp language support #40

Open 17-09 opened 4 years ago

17-09 commented 4 years ago

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!

image image

ganevdev commented 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.

17-09 commented 4 years ago

Thanks for your efforts. I'm new to gatsby, I'll try to find another way!

17-09 commented 4 years ago

we only need do shadow gatsby-plugin-theme-ui/components.js like this image image

Then update styles.code at gatsby-plugin-theme-ui/index.js like this image

I think we should add this customize to the readme file @Ganevru

ganevdev commented 4 years ago

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.