Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
remark-docusaurus-tabs
Advanced tools
remark plugin to transform standard markdown headings to docusaurus(v2) JSX tabs.
[remark][https://github.com/remarkjs/remark] plugin to transform standard markdown headings to [docusaurus][https://github.com/facebook/docusaurus] (v2) JSX tabs.
This package expects [
remark-slug
][https://github.com/remarkjs/remark-slug] to be used before it, which is already the case for docusaurus, but may need to be considered if used outside docusaurus.
npm install remark-docusaurus-tabs
Then add it to your site's docusaurus.config.js
plugins
option:
module.exports = {
// ...
plugins: ['remark-docusaurus-tabs'],
};
Annotate the markdown with a tabs
comment prior to the first tab heading. For example, the following markdown file:
<!--tabs-->
# Apple
This is an apple 🍎
# Orange
This is an orange 🍊
# Banana
This is a banana 🍌
will be transformed to:
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs defaultValue="apple" values={[{label:"Apple",value:"apple"},{label:"Orange",value:"orange"},{label:"Banana",value:"banana"}]}>
<TabItem value="apple">
This is an apple 🍎
</TabItem>
<TabItem value="orange">
This is an orange 🍊
</TabItem>
<TabItem value="banana">
This is a banana 🍌
</TabItem>
</Tabs>
The first heading after the tabs
comment becomes the first tab, with the other tabs taken from the headings with the same level as the first heading. The tab body is the content between the headings. The tabs finish when there is a higher level heading, or may be terminated explicitly with a /tabs
comment.
[MIT][LICENSE] © [Paul McClean][author]
FAQs
remark plugin to transform standard markdown headings to docusaurus(v2) JSX tabs.
The npm package remark-docusaurus-tabs receives a total of 620 weekly downloads. As such, remark-docusaurus-tabs popularity was classified as not popular.
We found that remark-docusaurus-tabs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.