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

How to get code highlight in markdown? #111

Closed
xmlking opened this issue Dec 28, 2019 · 8 comments · Fixed by #120
Closed

How to get code highlight in markdown? #111

xmlking opened this issue Dec 28, 2019 · 8 comments · Fixed by #120
Assignees
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@xmlking
Copy link

xmlking commented Dec 28, 2019

If I have the following markdown for blog application, how do I get syntax highlighted?
do you have to add any 3rd party CSS ?

---
title: My second page
author: Sander Elias
publish: true
publish_date: 2019-11-27
description: This is the second demo page in this sample.
---
# Page 3

## its a wild world after all

    ```typescript
      console.log('amazing')
    ```
@xmlking xmlking added the documentation Improvements or additions to documentation label Dec 28, 2019
@d-koppenhagen
Copy link
Contributor

Hey, the rendered markdown code contains the class names matching with this ones used by prismjs.
So you can just include prismjs in your project and it will work.
In my repo https://github.com/d-koppenhagen/d-koppenhagen.de you can see how it will be implemented

@d-koppenhagen
Copy link
Contributor

Nonetheless I think a small paragraph in the docs would be good to point this out.

@Villanuevand Villanuevand added the question Further information is requested label Dec 30, 2019
@Villanuevand
Copy link
Contributor

@d-koppenhagen
Would you like add a small paragraph in docs/blog.md with the explanation?

Could you add it?

@d-koppenhagen
Copy link
Contributor

Sure. I will send a PR later :)

@Villanuevand
Copy link
Contributor

Villanuevand commented Dec 30, 2019

Sure. I will send a PR later :)

No rush, Thanks @d-koppenhagen
If you need help to contribute flow , just let me know...

d-koppenhagen added a commit to d-koppenhagen/scully that referenced this issue Dec 30, 2019
@xmlking
Copy link
Author

xmlking commented Dec 31, 2019

@d-koppenhagen I am getting Copy to Clipboard plugin loaded before Toolbar plugin. warning
I am also not getting copy button for code highlight section. Rest of the styling works.
any suggestions to fix this?
Thanks

image

@d-koppenhagen
Copy link
Contributor

Hmm good question. Can you compare it maybe with my implementation here: d-koppenhagen/k9n.dev@330e400 ? I don't see this warning when starting my project.

@d-koppenhagen
Copy link
Contributor

@SanderElias I am also thinking about a configuration option for an easier setup / integration. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants