Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 694da7c

Browse files
authored
feat(releases): refactored how we display, parse and render release data (#2734)
1 parent ebb1489 commit 694da7c

File tree

54 files changed

+1391
-732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1391
-732
lines changed

content/api/v18/navigation.json

Lines changed: 273 additions & 273 deletions
Large diffs are not rendered by default.

gatsby-config.js

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ const config = require('./src/config.json');
66
const { localesAsString, defaultLanguage } = require('./locales');
77

88
const gatsbyConfig = {
9+
flags: {
10+
FAST_DEV: true,
11+
DETECT_NODE_MUTATIONS: true,
12+
PARALLEL_SOURCING: true,
13+
},
914
pathPrefix: process.env.PATH_PREFIX,
1015
siteMetadata: {
1116
title: config.title,
@@ -45,63 +50,63 @@ const gatsbyConfig = {
4550
resolve: 'gatsby-source-filesystem',
4651
options: {
4752
name: 'learn',
48-
path: path.resolve('./content/learn'),
53+
path: path.resolve(__dirname, './content/learn'),
4954
},
5055
},
5156
{
5257
resolve: 'gatsby-source-filesystem',
5358
options: {
5459
name: 'sites',
55-
path: path.resolve('./src/pages'),
60+
path: path.resolve(__dirname, './src/pages'),
5661
},
5762
},
5863
{
5964
resolve: 'gatsby-source-filesystem',
6065
options: {
6166
name: 'homepage',
62-
path: path.resolve('./content/homepage'),
67+
path: path.resolve(__dirname, './content/homepage'),
6368
},
6469
},
6570
{
6671
resolve: 'gatsby-source-filesystem',
6772
options: {
6873
name: 'community',
69-
path: path.resolve('./content/community'),
74+
path: path.resolve(__dirname, './content/community'),
7075
},
7176
},
7277
{
7378
resolve: 'gatsby-source-filesystem',
7479
options: {
7580
name: 'blog',
76-
path: path.resolve('./content/blog'),
81+
path: path.resolve(__dirname, './content/blog'),
7782
},
7883
},
7984
{
8085
resolve: 'gatsby-source-filesystem',
8186
options: {
8287
name: 'data',
83-
path: path.resolve('./src/data'),
88+
path: path.resolve(__dirname, './src/data'),
8489
},
8590
},
8691
{
8792
resolve: 'gatsby-source-filesystem',
8893
options: {
8994
name: 'about',
90-
path: path.resolve('./content/about'),
95+
path: path.resolve(__dirname, './content/about'),
9196
},
9297
},
9398
{
9499
resolve: 'gatsby-source-filesystem',
95100
options: {
96101
name: 'download',
97-
path: path.resolve('./content/download'),
102+
path: path.resolve(__dirname, './content/download'),
98103
},
99104
},
100105
{
101106
resolve: 'gatsby-source-filesystem',
102107
options: {
103108
name: 'api',
104-
path: path.resolve('./content/api'),
109+
path: path.resolve(__dirname, './content/api'),
105110
},
106111
},
107112
'gatsby-plugin-typescript',
@@ -176,7 +181,7 @@ const gatsbyConfig = {
176181
resolve: `gatsby-theme-i18n`,
177182
options: {
178183
defaultLang: defaultLanguage,
179-
configPath: path.resolve('./src/i18n/config.json'),
184+
configPath: path.resolve(__dirname, './src/i18n/config.json'),
180185
prefixDefault: true,
181186
locales: localesAsString,
182187
},

gatsby-node.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ const apiTypesNavigationData = yaml.parse(
2929

3030
// This creates a map of all the locale JSONs that are enabled in the config.json file
3131
const intlMessages = nodeLocales.locales.reduce((acc, locale) => {
32-
const filePath = require.resolve(`./src/i18n/locales/${locale.code}.json`);
32+
const filePath = path.resolve(
33+
__dirname,
34+
`./src/i18n/locales/${locale.code}.json`
35+
);
3336
acc[locale.code] = JSON.parse(fs.readFileSync(filePath, 'utf8'));
3437
return acc;
3538
}, {});
@@ -71,10 +74,11 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
7174

7275
const pageRedirects = { ...redirects };
7376

74-
const apiTemplate = path.resolve('./src/templates/api.tsx');
75-
const learnTemplate = path.resolve('./src/templates/learn.tsx');
76-
const blogTemplate = path.resolve('./src/templates/blog.tsx');
77+
const apiTemplate = path.resolve(__dirname, './src/templates/api.tsx');
78+
const learnTemplate = path.resolve(__dirname, './src/templates/learn.tsx');
79+
const blogTemplate = path.resolve(__dirname, './src/templates/blog.tsx');
7780
const blogCategoryTemplate = path.resolve(
81+
__dirname,
7882
'./src/templates/blog-category.tsx'
7983
);
8084

0 commit comments

Comments
 (0)