deepscan fixes
This commit is contained in:
parent
36b28a8f93
commit
5cb68f50de
5 changed files with 7 additions and 8 deletions
|
@ -7,7 +7,6 @@ export const getPostSlugPaths = (order) => {
|
|||
|
||||
for (const lang in order) {
|
||||
for (let i = 0; i < preGenerate; i++) {
|
||||
ß
|
||||
paths.push(localePath(lang, `${order[lang][i]}`))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
|||
import { DocsLayout, ns as layoutNs } from 'site/components/layouts/docs.mjs'
|
||||
import { loaders } from 'shared/components/dynamic-docs/org.mjs'
|
||||
|
||||
const ns = [...pageNs, layoutNs]
|
||||
export const ns = [...pageNs, layoutNs]
|
||||
/*
|
||||
* PLEASE READ THIS BEFORE YOU TRY TO REFACTOR THIS PAGE
|
||||
*
|
||||
|
|
|
@ -4,7 +4,7 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
|||
import { useCallback } from 'react'
|
||||
import { useDynamicMdx } from 'shared/hooks/use-dynamic-mdx.mjs'
|
||||
// Components
|
||||
import { Page } from './[...slug].mjs'
|
||||
import { Page, ns } from './[...slug].mjs'
|
||||
|
||||
const DocsHomePage = ({ page, slug, locale }) => {
|
||||
const loader = useCallback(
|
||||
|
|
|
@ -31,10 +31,10 @@ const NextPage = ({ t, s }) =>
|
|||
<span></span>
|
||||
)
|
||||
|
||||
const getItemWithCaveat = (index, slugLut, siteNav, shouldGet) => {
|
||||
if (index === false || shouldGet === true) return null
|
||||
const getItemWithCaveat = (index, slugLut, siteNav, shouldHide) => {
|
||||
if (shouldHide === true) return null
|
||||
|
||||
if (typeof shouldGet === 'function' && shouldGet(slugLut[index])) return null
|
||||
if (typeof shouldHide === 'function' && shouldHide(slugLut[index])) return null
|
||||
|
||||
return get(siteNav, slugLut[index].split('/'))
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ export const prebuildPosts = async (site) => {
|
|||
path.resolve('..', site, 'prebuild', `${types[i]}-paths.mjs`),
|
||||
`${header}export const order = ${JSON.stringify(
|
||||
sorted,
|
||||
2,
|
||||
null
|
||||
null,
|
||||
2
|
||||
)}\nexport const postInfo = ${JSON.stringify(resultPages, 2, null)}`
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue