Skip to content

Commit 0979bea

Browse files
authored
Merge branch 'master' into leecalcote/fix-mdx-styles
2 parents 774b2eb + 2dbaa09 commit 0979bea

6 files changed

Lines changed: 13897 additions & 9389 deletions

File tree

.github/workflows/build-and-deploy-site.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ jobs:
1717
with:
1818
fetch-depth: 1
1919

20+
- name: Cache Gatsby .cache and public folders
21+
uses: actions/cache@v4
22+
id: gatsby-cache
23+
with:
24+
path: |
25+
public
26+
.cache
27+
key: ${{ runner.os }}-gatsby-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-gatsby-
30+
2031
- name: Install and Build 🔧
2132
run: |
2233
npm install --legacy-peer-deps

gatsby-config.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ module.exports = {
115115
filter: { frontmatter: { published: { eq: true }${process.env.NODE_ENV === "development" ? ", date: { gte: \"2024-01-01\" }" : ""} } }
116116
) {
117117
nodes {
118-
html
118+
# Using excerpt instead of html because gatsby-plugin-mdx v5+ removed the html field
119+
excerpt
119120
frontmatter {
120121
title
121122
author
@@ -167,7 +168,7 @@ module.exports = {
167168
enclosure: node.frontmatter.thumbnail && {
168169
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
169170
},
170-
custom_elements: [{ "content:encoded": node.html }],
171+
custom_elements: [{ "content:encoded": node.excerpt }],
171172
});
172173
});
173174
},
@@ -192,7 +193,7 @@ module.exports = {
192193
enclosure: node.frontmatter.thumbnail && {
193194
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
194195
},
195-
custom_elements: [{ "content:encoded": node.html }],
196+
custom_elements: [{ "content:encoded": node.excerpt }],
196197
});
197198
});
198199
},
@@ -217,7 +218,7 @@ module.exports = {
217218
enclosure: node.frontmatter.thumbnail && {
218219
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
219220
},
220-
custom_elements: [{ "content:encoded": node.html }],
221+
custom_elements: [{ "content:encoded": node.excerpt }],
221222
});
222223
});
223224
},
@@ -242,7 +243,7 @@ module.exports = {
242243
enclosure: node.frontmatter.thumbnail && {
243244
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
244245
},
245-
custom_elements: [{ "content:encoded": node.html }],
246+
custom_elements: [{ "content:encoded": node.excerpt }],
246247
});
247248
});
248249
},
@@ -276,7 +277,7 @@ module.exports = {
276277
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
277278
},
278279
custom_elements: [
279-
{ "content:encoded": node.html },
280+
{ "content:encoded": node.excerpt },
280281
{ "content:type": node.frontmatter.type },
281282
{ "content:category": node.frontmatter.category },
282283
{ "content:tags": node.frontmatter.tags?.join(", ") || "" },
@@ -305,7 +306,7 @@ module.exports = {
305306
enclosure: node.frontmatter.thumbnail && {
306307
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
307308
},
308-
custom_elements: [{ "content:encoded": node.html }],
309+
custom_elements: [{ "content:encoded": node.excerpt }],
309310
});
310311
});
311312
},
@@ -330,7 +331,7 @@ module.exports = {
330331
enclosure: node.frontmatter.thumbnail && {
331332
url: site.siteMetadata.siteUrl + node.frontmatter.thumbnail.publicURL,
332333
},
333-
custom_elements: [{ "content:encoded": node.html }],
334+
custom_elements: [{ "content:encoded": node.excerpt }],
334335
});
335336
});
336337
},

gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if (process.env.CI === "true") {
1919
// All process.env.CI conditionals in this file are in place for GitHub Pages, if webhost changes in the future, code may need to be modified or removed.
2020
//Replacing '/' would result in empty string which is invalid
2121
const replacePath = (url) =>
22-
url === "/" || url.includes("/404") ? url : `${url}.html`;
22+
url === "/" || url.includes("/404") || url.endsWith(".html") ? url : `${url}.html`;
2323

2424
exports.onCreatePage = ({ page, actions }) => {
2525
const { createPage, deletePage, createRedirect } = actions;

0 commit comments

Comments
 (0)