Skip to content

Commit

Permalink
docs: tabbed code blocks in website (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski authored Mar 5, 2024
1 parent f59e6bf commit 91663a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 11 additions & 1 deletion website/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ title: Getting Started
slug: /
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Goal

Regular expressions are a powerful tool for matching text patterns, yet they are notorious for their hard-to-parse syntax, especially in the case of more complex patterns.
Expand Down Expand Up @@ -32,16 +35,23 @@ const hexColor = buildRegExp([

## Installation

<Tabs>
<TabItem value="npm" label="npm">

```sh
npm install ts-regex-builder
```

or
</TabItem>
<TabItem value="yarn" label="yarn">

```sh
yarn add ts-regex-builder
```

</TabItem>
</Tabs>

## Basic usage

```js
Expand Down
3 changes: 2 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://ts-regex-builder.github.io',
url: 'https://callstack.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/ts-regex-builder/',
Expand Down Expand Up @@ -97,6 +97,7 @@ const config = {
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash'],
},
}),
};
Expand Down

0 comments on commit 91663a7

Please sign in to comment.