Skip to content

Commit

Permalink
Disable code blocks in docs search (#1563)
Browse files Browse the repository at this point in the history
* Disable code blocks in docs search

* Add commands for docs package

* Add caveat for canary versions
  • Loading branch information
ovidiuch committed Nov 13, 2023
1 parent da2b475 commit dd79b2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const withNextra = nextra({
themeConfig: './theme.config.jsx',
defaultShowCopyCode: true,
staticImage: true,
flexsearch: {
codeblocks: false,
},
});

export default withNextra({
Expand Down
6 changes: 5 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"repository": "https://github.com/react-cosmos/react-cosmos/tree/main/docs",
"license": "MIT",
"type": "module",
"scripts": {},
"scripts": {
"start": "next dev",
"build": "next build",
"serve": "http-server -p 3001 ./out"
},
"dependencies": {
"@svgr/webpack": "^8.0.1",
"autoprefixer": "^10.4.16",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/docs/migration-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Install `react-cosmos-plugin-vite` instead of `react-cosmos-plugin-webpack` to u

<Callout type="info">
Replace `next` with `canary` to get the bleeding edge versions (latest commit
from the main branch).
from the main branch). Make sure to install [exact
versions](https://stackoverflow.com/a/30659125) when using the canary channel.
</Callout>

This major version accomplishes the following:
Expand Down

0 comments on commit dd79b2c

Please sign in to comment.