gatsby-remark-relative-images
- Version 2.0.5
- Published
- 16.7 kB
- 5 dependencies
- 0BSD license
Install
npm i gatsby-remark-relative-images
yarn add gatsby-remark-relative-images
pnpm add gatsby-remark-relative-images
Overview
Convert image src(s) in markdown to be relative to their node's parent directory. This will help gatsby-remark-images match images outside the node folder. For example, use with NetlifyCMS.
Index
Variables
variable defaultPluginOptions
const defaultPluginOptions: { staticFolderName: string; include: never[]; exclude: never[];};
Functions
function _default
_default: ( { files, markdownNode, markdownAST }: GatsbyNodePluginArgs, pluginOptions: PluginOptions) => Promise<void>;
function findMatchingFile
findMatchingFile: ( src: string, files: GatsbyFile[], options: PluginOptions) => GatsbyFile;
Type Aliases
type FrontMatterOptions
type FrontMatterOptions = { staticFolderName: string; include: string[]; exclude: string[];};
type GatsbyFile
type GatsbyFile = { absolutePath: string;};
type GatsbyNodePluginArgs
type GatsbyNodePluginArgs = { files: GatsbyFile[]; markdownNode: MarkdownNode; markdownAST: any; reporter: { info: (msg: string, error?: Error) => void; };};
type HtmlNode
type HtmlNode = { value: string;} & MarkdownNode;
type MarkdownNode
type MarkdownNode = { id: string; parent: string; url: string; frontmatter?: object; internal: { type: string; }; fileAbsolutePath: string;};
type Node
type Node = { dir: string;};
type PluginOptions
type PluginOptions = { staticFolderName: string; include: string[]; exclude: string[];};
Package Files (1)
Dependencies (5)
Dev Dependencies (8)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/gatsby-remark-relative-images
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/gatsby-remark-relative-images)
- HTML<a href="https://www.jsdocs.io/package/gatsby-remark-relative-images"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2669 ms. - Missing or incorrect documentation? Open an issue for this package.