bfchroma
chroma
bfchroma | chroma | |
---|---|---|
2 | 14 | |
63 | 4,190 | |
- | - | |
4.7 | 8.7 | |
about 2 months ago | 4 days ago | |
Go | Go | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bfchroma
-
Virgil: A Fast and Lightweight Programming Language That Compiles to WASM
I've used a markdown to html converter to convert my blog posts into HTML with very nice and customizable code samples... in my case I used Go's Blackfriday library with bfchroma[1] doing syntax highlighting with Chroma[2]. To add your language to Chroma you have to provide a lexer, which in turn is written in Pygments[3] syntax.
[1] https://github.com/Depado/bfchroma/
[2] https://github.com/alecthomas/chroma#supported-languages
[3] https://pygments.org/docs/lexerdevelopment/
-
My stack will outlive yours
Not being able to re-use html templates was a major problem for me (Web components could solve this when they get rid of the need for JS to use them, which I think will soon happen), and I also needed easy source code highlighting as I mostly write about code. So I wrote a Go generator that did just what I needed and now write my blog posts mostly in markdown, with support for code highlighting thanks to Blackfriday and bfchroma... both of which are simple Go libraries which I "vendor" (copy the source into my own project, so to speak) so if they stop maintaining them, it doesn't affect me much or at all.
chroma
- Alternative to Pygments
-
Sweeter searches with Pagefind
In Hugo and its built-in Chroma syntax highlighting, a code block begins with:
-
The strongest principle of the blog's growth lies in the human choice to deploy it
Hugo -> goldmark -> goldmark-highlighting -> chroma
- How to make code samples like this on the website?
-
Virgil: A Fast and Lightweight Programming Language That Compiles to WASM
I've used a markdown to html converter to convert my blog posts into HTML with very nice and customizable code samples... in my case I used Go's Blackfriday library with bfchroma[1] doing syntax highlighting with Chroma[2]. To add your language to Chroma you have to provide a lexer, which in turn is written in Pygments[3] syntax.
[1] https://github.com/Depado/bfchroma/
[2] https://github.com/alecthomas/chroma#supported-languages
[3] https://pygments.org/docs/lexerdevelopment/
-
Generating HMTL and MD files from .TXT in GO
quick for generating Html and syntax highlighting code blocks
-
Tran - 🖥 Securely transfer and send anything between computers with TUI.
Chroma
- Chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-coloured text, etc.
-
Screenshot Sunday: What does your Emacs look like today?
For books from other publishers, I am just hardcoding language directly on an ad hoc basis. I briefly considered off-loading language detection to a library like chroma, but that might be too much work for little benefit.
-
🐻 Go data validation and filtering with gookit/validate
Great blog, you should definitely do research on how you could implement a syntax highlighter for the code parts. Go Hugo for example, uses Chroma. Nice work 👍
What are some alternatives?
toml - TOML parser for Golang with reflection.
golang-ical - A ICS / ICal parser and serialiser for Golang.
gofeed - Parse RSS, Atom and JSON feeds in Go
prism.el - Disperse Lisp forms (and other languages) into a spectrum of colors by depth
sh - A shell parser, formatter, and interpreter with bash support; includes shfmt
Pake - 🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用
vigil - Vigil, the eternal morally vigilant programming language
doom-modeline - A fancy and fast mode-line inspired by minimalism design.
virgil - A fast and lightweight native programming language
colorize - A Syntax Highlighting library
v86 - x86 PC emulator and x86-to-wasm JIT, running in the browser
home - my linux home settings