feat(shared): Oon't load docs in lab
This commit is contained in:
parent
94f96ec605
commit
7b7a33f597
6 changed files with 8 additions and 6 deletions
2
sites/lab/components/dynamic-org-docs.mjs
Normal file
2
sites/lab/components/dynamic-org-docs.mjs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
// This is how we skip the docs in the lab
|
||||||
|
export const DynamicOrgDocs = false
|
3
sites/org/components/dynamic-org-docs.mjs
Normal file
3
sites/org/components/dynamic-org-docs.mjs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
import { DynamicOrgDocs as Component } from 'shared/components/dynamic-docs/org.mjs'
|
||||||
|
|
||||||
|
export const DynamicOrgDocs = Component
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
|
@ -9,7 +9,7 @@ import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/index.mjs'
|
import { Workbench, ns as wbNs } from 'shared/components/workbench/index.mjs'
|
||||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||||
import { Null } from 'shared/components/null.mjs'
|
import { Null } from 'shared/components/null.mjs'
|
||||||
{{{ docs }}}
|
import { DynamicOrgDocs as DynamicDocs } from 'site/components/dynamic-org-docs.mjs'
|
||||||
|
|
||||||
// Translation namespaces used on this page
|
// Translation namespaces used on this page
|
||||||
const namespaces = [...new Set(['{{ design }}', ...wbNs, ...pageNs])]
|
const namespaces = [...new Set(['{{ design }}', ...wbNs, ...pageNs])]
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/index.mjs'
|
import { Workbench, ns as wbNs } from 'shared/components/workbench/index.mjs'
|
||||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||||
import { Null } from 'shared/components/null.mjs'
|
import { Null } from 'shared/components/null.mjs'
|
||||||
{{{ docs }}}
|
import { DynamicOrgDocs as DynamicDocs } from 'site/components/dynamic-org-docs.mjs'
|
||||||
|
|
||||||
// Translation namespaces used on this page
|
// Translation namespaces used on this page
|
||||||
const namespaces = [...new Set(['{{ design }}', ...wbNs, ...pageNs])]
|
const namespaces = [...new Set(['{{ design }}', ...wbNs, ...pageNs])]
|
||||||
|
|
|
@ -44,9 +44,6 @@ export const prebuildOrg = async (site = 'org') => {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only add docs to org pages
|
|
||||||
const docs = site === 'org' ? withDocs : withoutDocs
|
|
||||||
|
|
||||||
for (const design in designs) {
|
for (const design in designs) {
|
||||||
// Generate new/pattern/design pages
|
// Generate new/pattern/design pages
|
||||||
for (const page in pages) {
|
for (const page in pages) {
|
||||||
|
@ -54,7 +51,7 @@ export const prebuildOrg = async (site = 'org') => {
|
||||||
promises.push(
|
promises.push(
|
||||||
fs.writeFile(
|
fs.writeFile(
|
||||||
pages[page].file(design),
|
pages[page].file(design),
|
||||||
mustache.render(pages[page].page, { docs, design, Design: capitalize(design) })
|
mustache.render(pages[page].page, { design, Design: capitalize(design) })
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue