Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix stork options with unstable_ #186

Merged
merged 1 commit into from
Jul 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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