January 23, 2025

How to do colored code formating in jekyll

Thanks for taking a stop at my corner of the web!

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.

  1. install rouge
  2. modify your _config.yml file
  3. create a syntax.css file and add the following code block
  4. modify your header by including this
  5. display your code as shown below