Community Plugin
View plugin on GitHubgatsby-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-domainsCapatibilities
- 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',
}
}
},
},
],
},
},
];