Skip to content

Commit

Permalink
Merge pull request #186 from shuding/fixes
Browse files Browse the repository at this point in the history
Prefix stork options with `unstable_`
  • Loading branch information
shuding authored Jul 4, 2021
2 parents b23af64 + 84c9208 commit 34d76c2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
stork: false,
unstable_stork: false,
unstable_staticImage: true
})

Expand Down
2 changes: 1 addition & 1 deletion examples/docs/theme.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
</>
),
search: true,
UNSTABLE_stork: true,
unstable_stork: true,
prevLinks: true,
nextLinks: true,
footer: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-docs/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const Layout = ({ filename, config: _config, pageMap, meta, children }) => {

{config.customSearch ||
(config.search ? (
config.UNSTABLE_stork ? (
config.unstable_stork ? (
<StorkSearch />
) : (
<Search directories={flatDirectories} />
Expand Down
4 changes: 2 additions & 2 deletions packages/nextra/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default (...args) => (nextConfig = {}) => {
pageExtensions = pageExtensions.concat(markdownExtensions)
}

if (nextraConfig.stork) {
if (nextraConfig.unstable_stork) {
console.log(
'You have Stork indexing enabled for Nextra. Stork binary:',
STORK_PATH
Expand Down Expand Up @@ -82,7 +82,7 @@ export default (...args) => (nextConfig = {}) => {
})

if (!config.plugins) config.plugins = []
if (nextraConfig.stork) {
if (nextraConfig.unstable_stork) {
config.plugins.push({
apply: compiler => {
compiler.hooks.done.tap('buildStorkIndex', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/nextra/src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default async function (source) {
themeConfig,
locales,
defaultLocale,
stork,
unstable_stork,
unstable_staticImage
} = options
const { resourcePath, resourceQuery } = this
Expand All @@ -187,7 +187,7 @@ export default async function (source) {
source = content

// Add content to stork indexes
if (stork) {
if (unstable_stork) {
// We only index .MD and .MDX files
if (mdxExtension.test(filename)) {
await addStorkIndex({
Expand Down

1 comment on commit 34d76c2

@vercel
Copy link

@vercel vercel bot commented on 34d76c2 Jul 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nextra-dev – ./examples/docs

nextra-dev-git-core-shuding1.vercel.app
nextra-dev.vercel.app
nextra-dev-shuding1.vercel.app

Please sign in to comment.