8000 GitHub - ghousahmed/graphene: Lighter Carbon alternative made with Shiki · GitHub
[go: up one dir, main page]

Skip to content

About

Lighter Carbon alternative made with Shiki

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

logo.png


Usage

Please visit https://graphene.teknologiumum.com for Graphene Web UI and its documentation.

I'm here for Hacktoberfest, what can I do?

If you're new to open source, we really recommend reading a few articles about contributing to open source projects:

You can start by reading the CONTRIBUTING.md. Then you can search for issues that you can work on.

Have fun!

FAQ

Why Shiki?

Because it gives pretty much the same accurate highlighting as Visual Studio Code. Though it won't highlight it semantically since it still uses RegEx.

How it works

  • You send a request with stuff
  • Graphene does its magic
  • ???
  • Profit
ok sorry, click here for the real answer
  • You send a POST request with a JSON body containing valid options
  • It will Highlight the code using Shiki and apply some options
  • Then, render the result to svg using custom svg renderer which is a heavily modified version of the original svg renderer
  • Apply border, upscale, and convert to the desired output format using sharpjs
  • Send it back to you

..what is up with the commit messages?

I don't even know

Why do I prefer this over, say, carbon.now.sh?

Well, I made this because I want it to be used programatically, without having to open a browser and doing it myself. Because it uses shiki, the highlight produced is more accurate, it's identical to the one used in vscode.

About

Lighter Carbon alternative made with Shiki

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0