From 357462cc195b6498033b7f56bca143edc6563405 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Sun, 22 Jun 2025 09:49:00 -0700 Subject: [PATCH] Remove unused link; update html/.gitignore --- html/.gitignore | 1 + ...2025-06-20-add-a-pygments-lexer-to-chroma.md | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/html/.gitignore b/html/.gitignore index fc8baad..628bfae 100644 --- a/html/.gitignore +++ b/html/.gitignore @@ -2,6 +2,7 @@ app.css code.html index.html pandoc.css +posts/add-a-pygments-lexer-to-chroma.html posts/build-a-neovim-qt-appimage-from-source.html posts/build-static-website-generator-part-1.html posts/deploy-elixir-generated-html-with-docker-on-digitalocean.html diff --git a/posts/2025-06-20-add-a-pygments-lexer-to-chroma.md b/posts/2025-06-20-add-a-pygments-lexer-to-chroma.md index 8072e81..9049063 100644 --- a/posts/2025-06-20-add-a-pygments-lexer-to-chroma.md +++ b/posts/2025-06-20-add-a-pygments-lexer-to-chroma.md @@ -14,14 +14,18 @@ $index ## Introduction -[Gitea](https://github.com/go-gitea/gitea) uses [Chroma](https://github.com/alecthomas/chroma) for syntax highlighting. Chroma is based on the Python -syntax highlighter, [Pygments](https://github.com/pygments/pygments), and includes a [script](https://github.com/alecthomas/chroma/blob/484750a96fc430f49d6b69cc2a2a8b7a67691446/_tools/pygments2chroma_xml.py) to help convert Pygments -lexers for use with Chroma. We describe how below. +[Gitea][8] uses [Chroma][9] for syntax highlighting. Chroma is based on the +Python syntax highlighter, [Pygments][10], and includes a [script][11] to help +convert Pygments lexers for use with Chroma. We describe how below. +[8]: https://github.com/go-gitea/gitea +[9]: https://github.com/alecthomas/chroma +[10]: https://github.com/pygments/pygments +[11]: https://github.com/alecthomas/chroma/blob/484750a96fc430f49d6b69cc2a2a8b7a67691446/_tools/pygments2chroma_xml.py ## Setup -We're going to be using the `python` and `golang` [Docker][4] images. Docker +We're going to be using the `python` and `golang` [Docker][3] images. Docker Desktop is _not_ required. ```console @@ -35,10 +39,9 @@ Let's set up some aliases to make running the commands easier. $ alias docker-run='docker run --rm -it -w /opt -v $PWD:/opt' $ alias docker-run-go='docker-run golang' $ alias docker-run-py='docker-run python' - ``` +``` -[3]: https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user -[4]: https://docs.docker.com/engine/ +[3]: https://docs.docker.com/engine/ ## Convert a Pygments lexer to a Chroma lexer with `pygments2chroma_xml.py`