Skip to content
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
8 changes: 0 additions & 8 deletions data/onCreateNode/create-graphql-schema-customization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@ export const createSchemaCustomization: GatsbyNode['createSchemaCustomization']
meta_keywords: String
redirect_from: [String]
}
type HowToHtml implements Node {
slug: String
tutorial: Node
}
type HowToSourceFile implements Node {
howToName: String!
srcPath: String!
}
type Error implements Node {
message: String
}
Expand Down
39 changes: 0 additions & 39 deletions data/onCreateNode/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,6 @@ export const onCreateNode: GatsbyNode['onCreateNode'] = async ({
createNodeId,
createContentDigest,
}) => {
if (node.sourceInstanceName === 'how-tos') {
// We derive the name of the how-to from the path
const [tutorialName, src, ...paths] = (node.relativePath as string).split('/');

// this must be a supporting file outside of a how-to directory
if (tutorialName === '') {
return;
}

/*
* If this file is in the src directory, we create a new HowToSourceFile node
* associated with our tutorial
*/
if (src === 'src') {
// skip processing directories
if (node.internal.type === 'Directory') {
return;
}

const srcPath = paths.join('/');
const content = await loadNodeContent(node);
const contentDigest = createContentDigest(content);
const type = 'HowToSourceFile';

const fields = {
id: createNodeId(`${node.id} >>> Sandpack`),
howToName: tutorialName,
srcPath,
content,
internal: {
contentDigest,
type,
mediaType: node.internal.mediaType,
},
};
createNode(fields);
}
}

if (node.sourceInstanceName === 'examples' && node.extension) {
// Skip processing directories
if (node.internal.type === 'Directory') {
Expand Down
1 change: 0 additions & 1 deletion data/onCreatePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const pageLayoutOptions: Record<string, LayoutOptions> = {
},
'/docs/sdks': { leftSidebar: false, rightSidebar: false, template: 'sdk', mdx: false },
'/examples': { leftSidebar: false, rightSidebar: false, template: 'examples', mdx: false },
'/docs/how-to/pub-sub': { leftSidebar: true, rightSidebar: true, template: 'how-to', mdx: true },
'/docs/404': { leftSidebar: false, rightSidebar: false, template: '404', mdx: false },
};

Expand Down
14 changes: 1 addition & 13 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ export const plugins = [
name: `AblyChangelog`,
},
},
{
resolve: 'gatsby-plugin-root-import',
options: {
'how-tos': `${__dirname}/how-tos`,
},
},
'gatsby-plugin-root-import',
{
resolve: 'gatsby-plugin-mdx',
options: {
Expand Down Expand Up @@ -121,13 +116,6 @@ export const plugins = [
__key: 'images',
},
// Data
{
resolve: 'gatsby-source-filesystem',
options: {
name: 'how-tos',
path: './how-tos',
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
Expand Down
18 changes: 0 additions & 18 deletions how-tos/pub-sub/.eslintrc.cjs

This file was deleted.

26 changes: 0 additions & 26 deletions how-tos/pub-sub/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions how-tos/pub-sub/README.md

This file was deleted.

76 changes: 0 additions & 76 deletions how-tos/pub-sub/how-to.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions how-tos/pub-sub/index.html

This file was deleted.

31 changes: 0 additions & 31 deletions how-tos/pub-sub/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions how-tos/pub-sub/postcss.config.js

This file was deleted.

11 changes: 0 additions & 11 deletions how-tos/pub-sub/src/App.tsx

This file was deleted.

Loading