Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Code Highlight] Add csharp language support #40

Open
17-09 opened this issue Apr 5, 2020 · 4 comments
Open

[Code Highlight] Add csharp language support #40

17-09 opened this issue Apr 5, 2020 · 4 comments

Comments

@17-09
Copy link

17-09 commented Apr 5, 2020

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
Copy link
Member

ganevdev commented Apr 5, 2020

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
Copy link
Author

17-09 commented Apr 6, 2020

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

@17-09
Copy link
Author

17-09 commented Apr 12, 2020

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants