Skip to content

Commit 6517940

Browse files
authored
Merge branch 'main' into auto-update-yt-desc
2 parents 98f6b98 + ab1e3ce commit 6517940

File tree

210 files changed

+1148
-132
lines changed

Some content is hidden

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

210 files changed

+1148
-132
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Use Node.js ${{ matrix.node-version }}
1818
uses: actions/setup-node@v3
1919
with:
20-
node-version: '18.x'
20+
node-version: '20.x'
2121
cache: 'npm'
2222
- run: npm ci
2323
- run: npm test

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
20

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Here are the types of contributions we are looking for:
2323

2424
1. Share your creative work inspired by a coding challenge or tutorial in the showcase!
2525

26-
- You can submit your showcase with the [Passenger Showcase Form](http://thecodingtrain.com/submit)
26+
- You can submit your showcase with the [Passenger Showcase Form](https://thecodingtrain.com/submit)
2727

2828
2. Add a new track to the site! (https://github.com/CodingTrain/thecodingtrain.com/issues/279)
2929

@@ -49,4 +49,4 @@ To find an issue that you want to fix, scan through the list. You may find that
4949

5050
### Development Environment
5151

52-
Make sure you have Node.js version `18.x` as well as npm installed. You can find how to test your changes locally [here](https://github.com/CodingTrain/thecodingtrain.com#development-info).
52+
Make sure you have Node.js version `20.x` as well as npm installed. You can find how to test your changes locally [here](https://github.com/CodingTrain/thecodingtrain.com#development-info).

HACKTOBERFEST.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This Hacktoberfest, here are the ways you can contribute to The Coding Train:
44

55
1. **Share your creative work on the Passenger Showcase!**
66

7-
- For your submission to count towards Hacktoberfest, you must manually create a Pull Request to the website repository. You can follow along with the [Passenger Showcase Guide](http://thecodingtrain.com/guides/passenger-showcase-guide) (scroll down below the form) to create your Pull Request.
7+
- For your submission to count towards Hacktoberfest, you must manually create a Pull Request to the website repository. You can follow along with the [Passenger Showcase Guide](https://thecodingtrain.com/guides/passenger-showcase-guide) (scroll down below the form) to create your Pull Request.
88

99
2. **Curate content for the website**
1010

@@ -21,6 +21,7 @@ This Hacktoberfest, here are the ways you can contribute to The Coding Train:
2121
- You can contribute to other [Coding Train repositories](https://github.com/CodingTrain/) as well. You will need to ask for the Pull Request to be accepted for Hacktoberfest to count it towards your progress.
2222

2323
## Guide For Newer Contributors
24+
2425
If you are new to open source contributions, here are some useful resources that can help you get started:
2526

2627
- [Git and GitHub for Poets](https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZF9C0YMKuns9sLDzK6zoiV): A Coding Train video series for Git and GitHub beginners.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Coding Train Website
22

33
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4+
45
[![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-)
6+
57
<!-- ALL-CONTRIBUTORS-BADGE:END -->
68

79
This repo holds the website for [thecodingtrain.com](https://thecodingtrain.com/). The website is built with:
810

911
- [Gatsby](https://www.gatsbyjs.com/) to perform the static site rendering
10-
- [React](https://reactjs.org/) as the general JavaScript framework
12+
- [React](https://react.dev/) as the general JavaScript framework
1113

1214
## Table of Contents
1315

@@ -17,7 +19,7 @@ This repo holds the website for [thecodingtrain.com](https://thecodingtrain.com/
1719

1820
## Development info
1921

20-
When updating the website, it is helpful to run the website locally in order to quickly see the changes made. Make sure you have Node.js version `18.x` installed and then perform the following steps:
22+
When updating the website, it is helpful to run the website locally in order to quickly see the changes made. Make sure you have Node.js version `20.x` installed and then perform the following steps:
2123

2224
1. Clone down the repo to your computer and `cd` into the folder
2325
2. Run `npm install`

content-testing/schemas.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ const baseVideosSchema = strictObject({
2121
title: string().required(),
2222
description: string().required(),
2323

24-
videoId: youtubeIdValidator.when(['parts'], (parts, schema) => {
24+
videoId: youtubeIdValidator.when('parts', ([parts], schema) => {
2525
// videoId required if the `parts` array is missing or empty
26-
return parts && parts.length > 0 ? schema : schema.required();
26+
return parts && parts.length > 0
27+
? schema.test(
28+
'videoId and parts conflict',
29+
'Top-level "videoId" should not be defined if "parts" exist',
30+
(value) => value === undefined
31+
)
32+
: schema.required();
2733
}),
2834

2935
nebulaSlug: nonUrlStringValidator,
@@ -289,7 +295,7 @@ const socialGroup = strictObject({
289295
title: string().required(),
290296
links: array(
291297
strictObject({
292-
url: string().url().required(),
298+
url: urlOrRelativeLinkValidator.required(),
293299
site: string()
294300
.oneOf(['twitter', 'discord', 'instagram', 'youtube', 'github'])
295301
.required()

content-testing/validators.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ const relativeLinks = {
319319
'/guides': slugs.guides,
320320
'/showcase': new Set(),
321321
'/faq': new Set(),
322-
'/about': new Set()
322+
'/about': new Set(),
323+
'/discord': new Set()
323324
};
324325

325326
const urlOrRelativeLinkValidator = string().test(

content/pages/about/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"url": "https://www.youtube.com/c/TheCodingTrain/",
3737
"site": "youtube"
3838
},
39-
{ "url": "https://thecodingtrain.com/discord", "site": "discord" },
39+
{ "url": "/discord", "site": "discord" },
4040
{ "url": "https://github.com/CodingTrain", "site": "github" }
4141
]
4242
}

content/pages/challenges/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"title": "Challenges",
33
"description": "Ready to apply what you’ve learned in the Tracks? Try a Challenge! These one-off project videos build off concepts introduced in Tracks and may have prerequisites (listed on the challenge page itself).",
44
"featuredText": "Featured Challenge:",
5-
"featuredChallenge": "183-mathematical-marbling"
5+
"featuredChallenge": "185-dragon-curve"
66
}

content/pages/faqs/cafe-car.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"question": "Cafe Car",
33
"answer": {
4-
"text": "The Cafe Car is the place to meet and chat with the Coding Train community! Your first stop is the [Discord](https://thecodingtrain.com/discord), but we’d also love for you to say hi on [Twitter](https://twitter.com/thecodingtrain) and [Instagram](https://www.instagram.com/the.coding.train)!"
4+
"text": "The Cafe Car is the place to meet and chat with the Coding Train community! Your first stop is the [Discord](/discord), but we’d also love for you to say hi on [Twitter](https://twitter.com/thecodingtrain) and [Instagram](https://www.instagram.com/the.coding.train)!"
55
}
66
}

0 commit comments

Comments
 (0)