MDX autolink headings

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

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
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
  • rehype-slug

    plugin to add `id` attributes to headings

  • The heading component renders an a tag, with a href which points to the id which was generated by the rehype-slug and passed as prop to our component. The a tag uses the group class, this allows us to apply styling to children if the parent is hovered. Also we use the relative class, because we want to position an icon absolute to the left of the heading.

  • contentlayer

    Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app

  • After the installation we have to tell MDX that it should use the plugin. The example below shows a contentlayer config, but it should work with every MDX setup.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • We could use rehype-autolink-headings for this, but we want to do some styling with TailwindCSS. So we have to wrap the heading manually.

  • Tailwind CSS

    A utility-first CSS framework for rapid UI development.

  • We could use rehype-autolink-headings for this, but we want to do some styling with TailwindCSS. So we have to wrap the heading manually.

  • mdx

    Markdown for the component era

  • And that's it, we can now hover over our MDX headings and should see a hash to the left. If we click a heading, we should see the id appended to the url in the browser address bar.

  • 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
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

  • Building an Autolink Heading Component for React Navigation

    3 projects | dev.to | 14 Nov 2023
  • My first post

    6 projects | /r/seriouslymate9 | 19 Sep 2021
  • how to retain position of markdown element in remark.js

    3 projects | dev.to | 4 Sep 2023
  • Example of Powerful Markdown Editor combining Svelte-Exmarkdown and Skeleton

    2 projects | /r/sveltejs | 7 Apr 2023
  • HTML to React service

    2 projects | /r/webdev | 6 Feb 2023