Skip to content

Commit

Permalink
Merge pull request #17846 from storybookjs/chore_docs_fix_dead_links_…
Browse files Browse the repository at this point in the history
…monorepo

Chore: (Docs) Fixes links across the monorepo
  • Loading branch information
jonniebigodes authored Apr 22, 2022
2 parents 2262d27 + 065cc58 commit 4c569dd
Show file tree
Hide file tree
Showing 37 changed files with 122 additions and 121 deletions.
2 changes: 1 addition & 1 deletion addons/controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you are somehow tied to knobs or prefer the knobs interface, we are happy to

### How do I migrate from addon-knobs?

If you're already using [Storybook Knobs](https://github.com/storybookjs/storybook/tree/main/addons/knobs) you should consider migrating to Controls.
If you're already using [Storybook Knobs](https://github.com/storybookjs/addon-knobs) you should consider migrating to Controls.

You're probably using it for something that can be satisfied by one of the cases [described above](#writing-stories).

Expand Down
2 changes: 1 addition & 1 deletion addons/docs/docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You've read the [Storybook Docs README](../README.md). You're already familiar w

## Does Docs support framework X?

Docs does not currently support [React Native](https://github.com/storybooks/storybook/tree/next/app/react-native). Otherwise, [it supports all frameworks that Storybook supports](../README.md#framework-support), including React, Vue, Angular, Ember, Svelte, and others.
Docs does not currently support [React Native](https://github.com/storybookjs/react-native). Otherwise, [it supports all frameworks that Storybook supports](../README.md#framework-support), including React, Vue, Angular, Ember, Svelte, and others.

## How does Docs interact with existing addons?

Expand Down
2 changes: 1 addition & 1 deletion addons/storyshots/storyshots-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ If you still need to configure jest you can use the resources mentioned below:

**NOTE**: if you are using Storybook 5.3's `main.js` to list story files, this is no longer needed.

Sometimes it's useful to configure Storybook with Webpack's require.context feature. You could be loading stories [one of two ways](https://storybook.js.org/docs/react/writing-stories/loading-stories).
Sometimes it's useful to configure Storybook with Webpack's require.context feature. You could be loading stories [one of two ways](https://github.com/storybookjs/storybook/blob/release/5.3/docs/src/pages/basics/writing-stories/index.md#loading-stories).

1. If you're using the `storiesOf` API, you can integrate it this way:

Expand Down
4 changes: 2 additions & 2 deletions app/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/angular/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/angular/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/angular/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.
4 changes: 2 additions & 2 deletions app/ember/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/ember/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/ember/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/ember/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

## Docs

Expand Down
4 changes: 2 additions & 2 deletions app/html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/html/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/html/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/html/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.
4 changes: 2 additions & 2 deletions app/preact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/preact/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/preact/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/preact/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

## Docs

Expand Down
4 changes: 2 additions & 2 deletions app/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/react/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/react/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/react/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

Here are some featured storybooks that you can reference to see how Storybook works:

Expand Down
2 changes: 1 addition & 1 deletion app/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Just like CSF stories we can define `argTypes` to specify the controls used in t

## Addon compatibility

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/react/configure/storybook-addons) and a great API to customize as you wish. As some addons assume the story is rendered in JS, they may not work with `@storybook/server` (yet!).
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. As some addons assume the story is rendered in JS, they may not work with `@storybook/server` (yet!).

Many addons that act on the manager side (such as `backgrounds` and `viewport`) will work out of the box with `@storybook/server` -- you can configure them with parameters written on the server as usual.

Expand Down
4 changes: 2 additions & 2 deletions app/svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/svelte/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/svelte/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/svelte/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

## TODOs

Expand Down
4 changes: 2 additions & 2 deletions app/vue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/vue/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/vue/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

## Vue Notes

Expand Down
4 changes: 2 additions & 2 deletions app/vue3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/vue3/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/vue3/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want.

## Extending the Vue application

Expand Down
4 changes: 2 additions & 2 deletions app/web-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ For more information visit: [storybook.js.org](https://storybook.js.org)

---

Storybook also comes with a lot of [addons](https://storybook.js.org/docs/web-components/configure/storybook-addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/web-components/workflows/publish-storybook) of your storybook and deploy it anywhere you want.
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
You can also build a [static version](https://storybook.js.org/docs/web-components/sharing/publish-storybook) of your storybook and deploy it anywhere you want.

# Hot Module Reloading (HMR)

Expand Down
2 changes: 1 addition & 1 deletion docs/addons/addon-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: 'Add to the addon catalog'
---

Storybook addons are listed in the [catalog](/addons) and distributed via npm. The catalog is populated by querying npm's registry for Storybook-specific metadata in `package.json`.
Storybook addons are listed in the [catalog](https://storybook.js.org/addons/) and distributed via npm. The catalog is populated by querying npm's registry for Storybook-specific metadata in `package.json`.

Add your addon to the catalog by publishing a npm package that follows these requirements:

Expand Down
8 changes: 4 additions & 4 deletions docs/addons/configure-addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ Presets offload the burden of configuration from user to the addon. Preset optio

For example, many libraries require that the app be wrapped by a `Provider` which _provides_ data to components down the tree. Presets can describe behavior like adding wrappers automatically, without users having to do any manual configuration. If a user installs an addon that has Presets, the addon can instruct Storybook to wrap all stories in `Provider`. This allows folks to start using your library with Storybook, with just 1 line of config!

For more on presets, see: [Write a preset addon](./writing-presets)
For more on presets, see: [Write a preset addon](./writing-presets.md)

The mechanism for wrapping each story is referred to as a Storybook [decorator](../writing-stories/decorators). They allow you to augment stories with extra rendering functionality or by providing data.
The mechanism for wrapping each story is referred to as a Storybook [decorator](../writing-stories/decorators.md). They allow you to augment stories with extra rendering functionality or by providing data.

## Parameters

Parameters are available in the browser and are great for configuring addon behaviour globally, at the component level, or at the story level.

For example, the [Pseudo States addon](https://storybook.js.org/addons/storybook-addon-pseudo-states) uses parameters to enable the various pseudo-states. Users can provide global defaults and then override them at the story level.

Use the [`useParameter`](./addons-api#useparameter) hook to access the parameter values within your addon.
Use the [`useParameter`](./addons-api.md#useparameter) hook to access the parameter values within your addon.

```js
export const Hover = () => <Button>Label</Button>;
Expand All @@ -33,6 +33,6 @@ Channels enable two-way communication between the manager and the preview pane,

For example, the [Actions addon](https://storybook.js.org/addons/@storybook/addon-actions) captures user events and displays their data in a panel.

Use the [`useChannel`](./addons-api#usechannel) hook to access the channel data within your addon.
Use the [`useChannel`](./addons-api.md#usechannel) hook to access the channel data within your addon.

For a complete example, check out [storybookjs/addon-kit/withRoundTrip.ts](https://github.com/storybookjs/addon-kit/blob/main/src/withRoundTrip.ts)
4 changes: 2 additions & 2 deletions docs/addons/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Storybook addons allow you to extend what's already possible with Storybook, eve

[UI-based addons](./addon-types.md#ui-based-addons) focus on customizing Storybook's user interface to extend your development workflow. Examples of UI-based addons include: [Controls](../essentials/controls.md), [Docs](../writing-docs/introduction.md) and [Accessibility](https://github.com/storybookjs/storybook/tree/master/addons/a11y).

[Learn how to write an addon »](./writing-addons)
[Learn how to write an addon »](./writing-addons.md)

### Preset addons

[Preset addons](./addon-types.md#preset-addons) help you integrate Storybook with other technologies and libraries. Examples of preset addons are: [preset-scss](https://github.com/storybookjs/presets/tree/master/packages/preset-scss) and [preset-create-react-app](https://github.com/storybookjs/presets/tree/master/packages/preset-create-react-app).

[Learn how to write a preset addon »](./writing-presets)
[Learn how to write a preset addon »](./writing-presets.md)
2 changes: 1 addition & 1 deletion docs/addons/writing-presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ For example, the following snippet adds a style tag to the preview head programm

Similarly, the `managerHead` can be used to modify the surrounding "manager" UI, analogous to `manager-head.html`.

Finally, the preview's main page _template_ can also be overridden using the `previewMainTemplate`, which should return a reference to a file containing an `.ejs` template that gets interpolated with some environment variables. For an example, see the [Storybook's default template](https://github.com/storybookjs/storybook/blob/next/lib/core-common/src/templates/index.ejs).
Finally, the preview's main page _template_ can also be overridden using the `previewMainTemplate`, which should return a reference to a file containing an `.ejs` template that gets interpolated with some environment variables. For an example, see the [Storybook's default template](https://github.com/storybookjs/storybook/blob/next/lib/core-common/templates/index.ejs).

## Sharing advanced configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/configure/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It has three different modes:

Storybook works with evergreen browsers by default.

If you want to run Storybook in IE11, make sure to [disable](../essentials/introduction#disabling-addons) the docs-addon that is part of `@storybook/addon-essentials`, as this currently [causes issues in IE11](https://github.com/storybookjs/storybook/issues/8884).
If you want to run Storybook in IE11, make sure to [disable](../essentials/introduction.md#disabling-addons) the docs-addon that is part of `@storybook/addon-essentials`, as this currently [causes issues in IE11](https://github.com/storybookjs/storybook/issues/8884).

Here are some key features of Storybook's Babel configurations.

Expand All @@ -38,7 +38,7 @@ You can also place a `.storybook/.babelrc` file to use a unique configuration fo

### Custom configuration

If you need, you can customize the default Babel configuration used by Storybook. Update your [`.storybook/main.js`](./overview#configure-your-storybook-project) and add the `babel` field with the options you want to use:
If you need, you can customize the default Babel configuration used by Storybook. Update your [`.storybook/main.js`](./overview.md#configure-your-storybook-project) and add the `babel` field with the options you want to use:

<!-- prettier-ignore-start -->

Expand Down
2 changes: 1 addition & 1 deletion docs/configure/images-and-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ In this case, you need to have all your images and media files with relative pat

If you load static content via importing, this is automatic, and you do not have to do anything.

Suppose you are serving assets in a [static directory](#serving-static-files-via-storybook) along with your Storybook. In that case, you need to use relative paths to load images or use the base element.
Suppose you are serving assets in a [static directory](#serving-static-files-via-storybook-configuration) along with your Storybook. In that case, you need to use relative paths to load images or use the base element.
2 changes: 1 addition & 1 deletion docs/configure/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The main configuration file is `main.js`. This file controls the Storybook serve
The `main.js` configuration file is a [preset](../addons/addon-types.md) and, as such, has a powerful interface, but the key fields within it are:

- `stories` - an array of globs that indicates the [location of your story files](#configure-story-loading), relative to `main.js`.
- `addons` - a list of the [addons](/addons) you are using.
- `addons` - a list of the [addons](https://storybook.js.org/addons/) you are using.
- `webpackFinal` - custom [webpack configuration](./webpack.md#extending-storybooks-webpack-config).
- `babel` - custom [babel configuration](./babel.md).
- `framework` - framework specific configurations to help the loading and building process.
Expand Down
2 changes: 1 addition & 1 deletion docs/configure/storybook-addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ There are many, many Storybook addons, but they can be roughly categorized into

- **Essential** addons are core-team developed addons that are considered a part of the out-of-the-box user experience. These ship by default with new Storybook installations.
- **Core** addons are developed by the core team. They are kept in sync with the development of Storybook itself and written in idiomatic ways as templates for other addons. They can be found within the [Storybook monorepo](https://github.com/storybookjs/storybook/tree/next/addons).
- **Community** addons are addons written by the massive Storybook community. They can be found on our [website](/addons), [GitHub](https://github.com/), and [npm](https://www.npmjs.com/).
- **Community** addons are addons written by the massive Storybook community. They can be found on our [website](https://storybook.js.org/addons/), [GitHub](https://github.com/), and [npm](https://www.npmjs.com/).
4 changes: 2 additions & 2 deletions docs/configure/styling-and-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ CSS-in-JS libraries are designed to use basic JavaScript, and they often work in

### Importing CSS files

If your component files import their CSS, Storybook's webpack configuration will work out of the box. The noticeable exception to this is if you're using a CSS precompiler. In this case, you can either install and configure a Storybook preset (e.g., [SCSS preset](https://github.com/storybookjs/presets/tree/master/packages/preset-scss)), or customize [Storybook's webpack configuration](./webpack#extending-storybooks-webpack-config) and include the appropriate loader.
If your component files import their CSS, Storybook's webpack configuration will work out of the box. The noticeable exception to this is if you're using a CSS precompiler. In this case, you can either install and configure a Storybook preset (e.g., [SCSS preset](https://github.com/storybookjs/presets/tree/master/packages/preset-scss)), or customize [Storybook's webpack configuration](./webpack.md#extending-storybooks-webpack-config) and include the appropriate loader.

<FeatureSnippets paths={['configure/css-troubleshooting/angular.mdx']} />

To use your CSS in all stories, you import it in [`.storybook/preview.js`](./overview.md#configure-story-rendering)

### Adding webfonts

If you need webfonts to be available, you may need to add some code to the [`.storybook/preview-head.html`](./story-rendering.md#adding-to-head) file. We recommend including any assets with your Storybook if possible, in which case you likely want to configure the [static file location](./images-and-assets#serving-static-files-via-storybook).
If you need webfonts to be available, you may need to add some code to the [`.storybook/preview-head.html`](./story-rendering.md#adding-to-head) file. We recommend including any assets with your Storybook if possible, in which case you likely want to configure the [static file location](./images-and-assets.md#serving-static-files-via-storybook-configuration).
Loading

0 comments on commit 4c569dd

Please sign in to comment.