Skip to content

Commit 124c882

Browse files
authored
Merge pull request #3067 from ably/EDU-2136-Remove-how-tos-2
chore: remove Ably Pub/Sub how-to tutorial
2 parents 90f4b92 + 96c8316 commit 124c882

40 files changed

Lines changed: 1 addition & 8690 deletions

data/onCreateNode/create-graphql-schema-customization.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ export const createSchemaCustomization: GatsbyNode['createSchemaCustomization']
2828
meta_keywords: String
2929
redirect_from: [String]
3030
}
31-
type HowToHtml implements Node {
32-
slug: String
33-
tutorial: Node
34-
}
35-
type HowToSourceFile implements Node {
36-
howToName: String!
37-
srcPath: String!
38-
}
3931
type Error implements Node {
4032
message: String
4133
}

data/onCreateNode/index.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,6 @@ export const onCreateNode: GatsbyNode['onCreateNode'] = async ({
77
createNodeId,
88
createContentDigest,
99
}) => {
10-
if (node.sourceInstanceName === 'how-tos') {
11-
// We derive the name of the how-to from the path
12-
const [tutorialName, src, ...paths] = (node.relativePath as string).split('/');
13-
14-
// this must be a supporting file outside of a how-to directory
15-
if (tutorialName === '') {
16-
return;
17-
}
18-
19-
/*
20-
* If this file is in the src directory, we create a new HowToSourceFile node
21-
* associated with our tutorial
22-
*/
23-
if (src === 'src') {
24-
// skip processing directories
25-
if (node.internal.type === 'Directory') {
26-
return;
27-
}
28-
29-
const srcPath = paths.join('/');
30-
const content = await loadNodeContent(node);
31-
const contentDigest = createContentDigest(content);
32-
const type = 'HowToSourceFile';
33-
34-
const fields = {
35-
id: createNodeId(`${node.id} >>> Sandpack`),
36-
howToName: tutorialName,
37-
srcPath,
38-
content,
39-
internal: {
40-
contentDigest,
41-
type,
42-
mediaType: node.internal.mediaType,
43-
},
44-
};
45-
createNode(fields);
46-
}
47-
}
48-
4910
if (node.sourceInstanceName === 'examples' && node.extension) {
5011
// Skip processing directories
5112
if (node.internal.type === 'Directory') {

data/onCreatePage.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const pageLayoutOptions: Record<string, LayoutOptions> = {
2121
},
2222
'/docs/sdks': { leftSidebar: false, rightSidebar: false, template: 'sdk', mdx: false },
2323
'/examples': { leftSidebar: false, rightSidebar: false, template: 'examples', mdx: false },
24-
'/docs/how-to/pub-sub': { leftSidebar: true, rightSidebar: true, template: 'how-to', mdx: true },
2524
'/docs/404': { leftSidebar: false, rightSidebar: false, template: '404', mdx: false },
2625
};
2726

gatsby-config.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ export const plugins = [
6666
name: `AblyChangelog`,
6767
},
6868
},
69-
{
70-
resolve: 'gatsby-plugin-root-import',
71-
options: {
72-
'how-tos': `${__dirname}/how-tos`,
73-
},
74-
},
69+
'gatsby-plugin-root-import',
7570
{
7671
resolve: 'gatsby-plugin-mdx',
7772
options: {
@@ -121,13 +116,6 @@ export const plugins = [
121116
__key: 'images',
122117
},
123118
// Data
124-
{
125-
resolve: 'gatsby-source-filesystem',
126-
options: {
127-
name: 'how-tos',
128-
path: './how-tos',
129-
},
130-
},
131119
{
132120
resolve: `gatsby-source-filesystem`,
133121
options: {

how-tos/pub-sub/.eslintrc.cjs

Lines changed: 0 additions & 18 deletions
This file was deleted.

how-tos/pub-sub/.gitignore

Lines changed: 0 additions & 26 deletions
This file was deleted.

how-tos/pub-sub/README.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

how-tos/pub-sub/how-to.mdx

Lines changed: 0 additions & 76 deletions
This file was deleted.

how-tos/pub-sub/index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

how-tos/pub-sub/package.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)