diff --git a/package.json b/package.json index 9846fb51d..423747019 100644 --- a/package.json +++ b/package.json @@ -220,7 +220,7 @@ }, "husky": { "hooks": { - "pre-commit": "node ./scripts/mdxImportGen && git add src/mdxGlobalComponents.js && lint-staged" + "pre-commit": "lint-staged" } }, "workspaces": [ diff --git a/plugins/gatsby-source-squeak/gatsby-node.ts b/plugins/gatsby-source-squeak/gatsby-node.ts index 12be6f2a0..0d8b665ad 100644 --- a/plugins/gatsby-source-squeak/gatsby-node.ts +++ b/plugins/gatsby-source-squeak/gatsby-node.ts @@ -14,6 +14,13 @@ export const sourceNodes: GatsbyNode['sourceNodes'] = async ( while (true) { let profileQuery = qs.stringify( { + filters: { + teams: { + id: { + $notNull: true, + }, + }, + }, pagination: { page, pageSize: 100, diff --git a/scripts/mdxImportGen.js b/scripts/mdxImportGen.js deleted file mode 100644 index bd3ab9595..000000000 --- a/scripts/mdxImportGen.js +++ /dev/null @@ -1,44 +0,0 @@ -const fs = require('fs') -const path = require('path') - -const baseDir = './src/components' -const mdxIgnore = fs.readFileSync(path.join(baseDir, './.mdxignore'), 'utf8') -const componentsToIgnore = new Set(mdxIgnore.split('\n')) - -const getComponentsInDir = (dir, components = []) => { - const dirContents = fs.readdirSync(dir) - let subdirectories = [] - let indexFileInDir = false - for (let f of dirContents) { - if (fs.lstatSync(`${dir}/${f}`).isDirectory() && !componentsToIgnore.has(f)) { - subdirectories.push(f) - continue - } - if (!indexFileInDir && f.includes('index') && !f.includes('css')) { - indexFileInDir = true - } - } - if (!subdirectories || indexFileInDir) { - return [...components, dir] - } - for (let subdir of subdirectories) { - components = getComponentsInDir(`${dir}/${subdir}`, components) - } - return components -} - -const generateFile = () => { - let imports = '// AUTO GENERATED FILE \n\n' - let componentNames = [] - for (let component of getComponentsInDir(baseDir)) { - const destructuredPath = component.split('/') - const relativePath = './' + destructuredPath.slice(2).join('/') - const componentName = destructuredPath[destructuredPath.length - 1] - imports += `import { ${componentName} } from '${relativePath}'\n` - componentNames.push(componentName) - } - imports += '\nexport const shortcodes = {\n\t' + componentNames.join(',\n\t') + '\n}' - fs.writeFileSync('./src/mdxGlobalComponents.js', imports) -} - -generateFile() diff --git a/src/components/Docs/InternalSidebarLink.tsx b/src/components/Docs/InternalSidebarLink.tsx index 2ec576fea..33b88daf4 100644 --- a/src/components/Docs/InternalSidebarLink.tsx +++ b/src/components/Docs/InternalSidebarLink.tsx @@ -15,12 +15,12 @@ export default function InternalSidebarLink({ url, name, depth, onClick, classNa = ({ title, url, links, children export const ProductAnalytics = () => { return ( - +