Skip to content

Commit

Permalink
docs(v2): add require.resolve to plugin imports on all pages (#2946)
Browse files Browse the repository at this point in the history
  • Loading branch information
teikjun committed Jun 16, 2020
1 parent e97d2ea commit 955e656
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.56/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ module.exports = {
// ...
plugins: [
[
'@docusaurus/plugin-content-blog',
require.resolve('@docusaurus/plugin-content-blog'),
{
/**
* URL route for the blog section of your site.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ List the [theme](using-themes.md), [plugins](using-plugins.md), and [presets](pr
module.exports = {
// ...
plugins: [
'@docusaurus/plugin-content-blog',
'@docusaurus/plugin-content-pages',
require.resolve('@docusaurus/plugin-content-blog'),
require.resolve('@docusaurus/plugin-content-pages'),
],
themes: ['@docusaurus/theme-classic'],
};
Expand All @@ -67,7 +67,7 @@ module.exports = {
// ...
plugins: [
[
'@docusaurus/plugin-content-blog',
require.resolve('@docusaurus/plugin-content-blog'),
{
path: 'blog',
routeBasePath: 'blog',
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-2.0.0-alpha.56/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This is equivalent of doing:
```jsx title="docusaurus.config.js"
module.exports = {
themes: ['@docusaurus/themes-cool', '@docusaurus/themes-bootstrap'],
plugins: ['@docusaurus/plugin-blog'],
plugins: [require.resolve('@docusaurus/plugin-blog')],
};
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ npm install --save docusaurus-plugin-sass
```jsx {3} title="docusaurus.config.js"
module.exports = {
// ...
plugins: ['docusaurus-plugin-sass'],
plugins: [require.resolve('docusaurus-plugin-sass')],
// ...
};
```
Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-2.0.0-alpha.56/using-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ For example, a Docusaurus blog consists of a blog plugin and a blog theme.
```js title="docusaurus.config.js"
{
theme: ['theme-blog'],
plugins: ['plugin-content-blog'],
plugins: [require.resolve('plugin-content-blog')],
}
```

Expand All @@ -63,7 +63,7 @@ And if you want to use Bootstrap styling, you can swap out the theme with `theme
```js title="docusaurus.config.js"
{
theme: ['theme-blog-bootstrap'],
plugins: ['plugin-content-blog'],
plugins: [require.resolve('plugin-content-blog')],
}
```

Expand Down

0 comments on commit 955e656

Please sign in to comment.