Adding Syntax Highlighting with Line Numbers to Gatsby MDX Using prism-react-renderer

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • prism-react-renderer

    🖌️ Renders highlighted Prism output to React (+ theming & vendored Prism)

    If you already haven’t integrated MDX into your project (you should because MDX is awesome), here’s the official guide on Gatsby's documentation to add it to your project. However, if you are already using Markdown Remark in your project, consider Migrating to MDX. In this post, we will integrate PrismJS syntax highlighting with MDX using prism-react-renderer. Also, we are going to add line numbers to code blocks. This is what we are aiming for:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • PrismJS

    Lightweight, robust, elegant syntax highlighting.

    If you already haven’t integrated MDX into your project (you should because MDX is awesome), here’s the official guide on Gatsby's documentation to add it to your project. However, if you are already using Markdown Remark in your project, consider Migrating to MDX. In this post, we will integrate PrismJS syntax highlighting with MDX using prism-react-renderer. Also, we are going to add line numbers to code blocks. This is what we are aiming for:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Starlight vs. Docusaurus for building documentation

    2 projects | dev.to | 13 Feb 2024
  • Is copying from open source projects stealing?

    3 projects | dev.to | 31 Oct 2023
  • Make Better Blog Posts with Beautiful Syntax Highlighting in Nextjs with React-Prism-Render

    1 project | dev.to | 29 Nov 2021
  • Language Tabs for Markdown & MDX Code Blocks

    1 project | dev.to | 6 Aug 2021
  • Import a File as a Raw String in Gatsby or React

    2 projects | dev.to | 17 Apr 2021

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?