{"_id":"@adaptable/platform-remark-plugins","name":"@adaptable/platform-remark-plugins","dist-tags":{"latest":"0.2.1-adaptable"},"versions":{"0.2.1-adaptable":{"name":"@adaptable/platform-remark-plugins","description":"A potpourri of remark plugins used to process .mdx files","version":"0.2.1-adaptable","author":{"name":"Jeff Escalante"},"bugs":{"url":"https://github.com/hashicorp/web-platform-packages/issues"},"contributors":[],"type":"module","sideEffects":false,"main":"./index.js","dependencies":{"remark":"^14.0.1","remark-html":"^15.0.0","remark-mdx":"^2.0.0-rc.2","remark-stringify":"^10.0.1","to-vfile":"^7.2.2","unist-builder":"^3.0.0","unist-util-is":"^5.1.1","unist-util-map":"^3.0.0","unist-util-visit":"^4.1.0"},"devDependencies":{"@mdx-js/mdx":"^2.0.0-rc.2","normalize-newline":"^4.1.0","rehype-remark":"^9.1.0","rehype-stringify":"^9.0.2","remark-rehype":"^10.0.1"},"repository":{"type":"git","url":"git+https://github.com/hashicorp/web-platform-packages.git","directory":"packages/remark-plugins"},"gitHead":"86980b0dd3dc421ea5b83c13c830a8737326698e","homepage":"https://github.com/hashicorp/web-platform-packages#readme","_id":"@adaptable/platform-remark-plugins@0.2.1-adaptable","_nodeVersion":"14.18.2","_npmVersion":"9.7.2","dist":{"integrity":"sha512-qwgWpPws4cgmq6WTuKdjHDh5Me1ZVvU0wOP+g+DmAL1Sp+t/YAVpQO6c0cpc5b0KAOiS9KVbJKNs+CY0BObkWQ==","shasum":"30fa88690a027bb42e6c4e465482092a874c191b","tarball":"https://registry.npmjs.org/@adaptable/platform-remark-plugins/-/platform-remark-plugins-0.2.1-adaptable.tgz","fileCount":31,"unpackedSize":32620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB7QKcBjNSwW21/R7rI69nWBCEz9OO15BSz+BMWpMZ+gIhAMv5GfIT3hWFqpmLSaH7VMuKFxTgy8Xtg7eFINdSN2fe"}]},"_npmUser":{"name":"mr_roboto","email":"robot@unbounded.systems"},"directories":{},"maintainers":[{"name":"mvachhar","email":"manishv@adaptable.io"},{"name":"mterrel","email":"mark@unbounded.systems"},{"name":"mr_roboto","email":"robot@unbounded.systems"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/platform-remark-plugins_0.2.1-adaptable_1687982640679_0.9035272593858013"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-28T20:04:00.610Z","0.2.1-adaptable":"2023-06-28T20:04:00.904Z","modified":"2023-06-28T20:04:01.096Z"},"maintainers":[{"name":"mvachhar","email":"manishv@adaptable.io"},{"name":"mterrel","email":"mark@unbounded.systems"},{"name":"mr_roboto","email":"robot@unbounded.systems"}],"description":"A potpourri of remark plugins used to process .mdx files","homepage":"https://github.com/hashicorp/web-platform-packages#readme","repository":{"type":"git","url":"git+https://github.com/hashicorp/web-platform-packages.git","directory":"packages/remark-plugins"},"contributors":[],"author":{"name":"Jeff Escalante"},"bugs":{"url":"https://github.com/hashicorp/web-platform-packages/issues"},"readme":"# `@hashicorp/platform-remark-plugins`\n\nA potpourri of [remark](https://github.com/remarkjs/remark) plugins used by [HashiCorp](https://www.hashicorp.com/) to process markdown files.\n\n## Overview\n\n[MDX](https://mdxjs.com) uses [remark](https://github.com/remarkjs/remark) internally to process and transform markdown via [plugins](https://github.com/remarkjs/remark/blob/master/doc/plugins.md#list-of-plugins). We use MDX to process markdown content to build out our docs, learning guides, and write rich content from our CMS. This set of plugins ensures that written markdown is translated properly into markup.\n\n### Anchor Links\n\nThe `anchorLinks` plugin adds anchor links to headings and when a list begins with an `inline code` element so that users are able to easily link to a specific place even if it is further down the page. See [its readme](plugins/anchor-links/README.md) for more details.\n\n### Include Markdown\n\nThe `includeMarkdown` plugin gives authors the ability to use a directive like `@include \"filename.md\" to import markdown from a separate file, like a partial. See [its readme](plugins/include-markdown/README.md) for more details.\n\n### Custom Alerts\n\nThe `paragraphCustomAlerts` plugin adds a custom syntax for creating alert boxes. See [its readme](plugins/inline-code-linkable/README.md) for more details. This plugin will be deprecated for a `<Alert />` component in the future in a step to move us toward full [commonmark](https://commonmark.org/) compliance.\n\n### Typography\n\nThe `typography` plugin adds css classes to certain typographical elements so that they adhere to the typography standards from our design system. See [its readme](plugins/inline-code-linkable/README.md) for more details.\n\n## Usage\n\nEach of the plugins are individually exposed from the default export from this module and can be used as any other remark plugin would be normally. For example, with raw mdx:\n\n```js\nimport { compileSync } from '@mdx-js/mdx'\nimport { typography, anchorLinks } from '@hashicorp/platform-remark-plugins'\n\nconsole.log(compileSync('some markdown content', {\n  remarkPlugins: [typography, anchorLinks]\n})\n```\n\nIf you'd like to use all of the plugins in one shot, which is typically the case with this module, an array of all the plugins is returned from the `allPlugins` export, as such:\n\n```js\nimport { compileSync } from '@mdx-js/mdx'\nimport allPlugins from '@hashicorp/platform-remark-plugins/all'\n\nconsole.log(compileSync('some markdown content', {\n  remarkPlugins: allPlugins(/* options */)\n})\n```\n\nPlugin options can be passed to `allPlugins` as an object, with the keys being plugin names. For example, to pass options to `headingLinkable`, you could call `allPlugins({ headingLinkable: { foo: 'bar' } })`.\n\nIf you are using `next-hashicorp`, all of these plugins will be included by default.\n","readmeFilename":"README.md"}