gatsby-remark-gitlab

1.0.5 • Public • Published

gatsby-remark-gitlab

ci npm

This is a plugin for gatsby-transformer-remark, which is in turn a plugin for GatsbyJS. This plugin is a simple wrapper around the remark-gitlab, which replace links to GitLab files in Markdown files with the actual content of those files, wrapped in Markdown code blocks that can optionally be further processed by a syntax highlighter (e.g. gatsby-remark-prismjs).

Installation

# npm:
npm install gatsby-remark-gitlab
# or yarn:
yarn add gatsby-remark-gitlab

Usage:

If you haven't already installed gatsby-transformer-remark, you should install it. If you want to have syntax highlighting by PrismJS, install gatsby-remark-prismjs as well.

Then in your gatsby-config.js, add this plugin to the list of plugins for gatsby-transformer-remark, preferably as the first one but definitely before gatsby-remark-prismjs:

module.exports = {
  // other configs ...
  plugins: [
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          {
            resolve: 'gatsby-remark-gitlab',
            options: {
              repository: 'user/project',
              mentionStrong: true,
            }
          },
          // ... other plugins ...
          'gatsby-remark-prismjs',
        ]
      }
    }
  ]
}

For sample input and output, please refer to the usage section of remark-gitlab.

License

gatsby-remark-gitlab is released under the MIT License. See the bundled LICENSE file for details.

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i gatsby-remark-gitlab

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

4.29 kB

Total Files

4

Last publish

Collaborators

  • iamjjc