Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

gatsby-remark-autolink-domains

This plugin extracts images from markdown files that are parsed with gatsby-transformer-remark.

How to install

npm i --save @libsrcdev/gatsby-remark-autolink-domains

Capatibilities

  • Autolink no-scheme domains to their full URL.
  • Supports custom extraction logic via a user-defined function.

Usecases

  • Automatically convert plain domain names in markdown to clickable links.
  • Customize link extraction based on specific criteria.

Usage

Example:

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-autolink-domains`,
          options: {
            mapUrl: (domain, rest) => {
              return {
                fullUrl: `custom-full-url-for-${domain}${rest}`,
                scheme: 'anycustomscheme',
                domain: 'anycustomdomain.com',
              }
            }
          },
        },
      ],
    },
  },
];
© 2026 Gatsby, Inc.