Skip to content

Commit

Permalink
doc: suggest not using useBaseUrl most of the time
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jan 29, 2021
1 parent 2c9d094 commit c1af0e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/docs/docusaurus-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ const MyComponent = () => {

### `useBaseUrl`

React hook to prepend your site `baseUrl` to a string.

:::caution

**Don't use it for regular links!**
Expand All @@ -233,7 +235,7 @@ The `/baseUrl/` prefix is automatically added to all **absolute paths** by defau

:::

React hook to automatically prepend `baseUrl` to a string automatically.
#### Options

```ts
type BaseUrlOptions = {
Expand All @@ -242,7 +244,7 @@ type BaseUrlOptions = {
};
```

Example usage:
#### Example usage:

```jsx
import React from 'react';
Expand Down

0 comments on commit c1af0e6

Please sign in to comment.